@roxyapi/ui 0.53.0 → 0.53.1

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.
@@ -1,4 +1,4 @@
1
- var RoxyUI_endpoint_form=(()=>{var Z=Object.defineProperty;var Ye=Object.getOwnPropertyDescriptor;var rr=Object.getOwnPropertyNames;var ir=Object.prototype.hasOwnProperty;var sr=(i,t)=>{for(var e in t)Z(i,e,{get:t[e],enumerable:!0})},or=(i,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of rr(t))!ir.call(i,s)&&s!==e&&Z(i,s,{get:()=>t[s],enumerable:!(r=Ye(t,s))||r.enumerable});return i};var nr=i=>or(Z({},"__esModule",{value:!0}),i),x=(i,t,e,r)=>{for(var s=r>1?void 0:r?Ye(t,e):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(r?n(t,e,s):n(s))||s);return r&&s&&Z(t,e,s),s};var jr={};sr(jr,{ROXY_UI_TOKENS_STYLE_ID:()=>J,RoxyEndpointForm:()=>g,injectRoxyTokens:()=>Q,resetSpecCache:()=>Nr});var We=`/**
1
+ var RoxyUI_endpoint_form=(()=>{var Z=Object.defineProperty;var We=Object.getOwnPropertyDescriptor;var ir=Object.getOwnPropertyNames;var sr=Object.prototype.hasOwnProperty;var or=(i,t)=>{for(var e in t)Z(i,e,{get:t[e],enumerable:!0})},nr=(i,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of ir(t))!sr.call(i,s)&&s!==e&&Z(i,s,{get:()=>t[s],enumerable:!(r=We(t,s))||r.enumerable});return i};var ar=i=>nr(Z({},"__esModule",{value:!0}),i),x=(i,t,e,r)=>{for(var s=r>1?void 0:r?We(t,e):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(r?n(t,e,s):n(s))||s);return r&&s&&Z(t,e,s),s};var Kr={};or(Kr,{ROXY_UI_TOKENS_STYLE_ID:()=>J,RoxyEndpointForm:()=>g,injectRoxyTokens:()=>Q,resetSpecCache:()=>Hr});var Ze=`/**
2
2
  * Roxy UI design tokens. 47 CSS custom properties that every component reads. Light + dark defaults. Host page overrides at :root or per element. No Tailwind, no class-name overrides, no JS theme switcher.
3
3
  *
4
4
  * Delivery model: this file ships as a global light-DOM stylesheet (linked, or auto-injected by the CDN bundle). Why every rule sits in a cascade layer is the note above the layer statement below. Custom properties inherit through the shadow boundary, so tokens set on a light-DOM ancestor reach every component shadow. The explicit theme blocks therefore target light-DOM selectors (:root, .dark, [data-theme="dark"], a wrapper element), NOT :host (a :host rule in a global sheet matches nothing). The :host([data-theme]) selectors are kept only for the case where this CSS is ever adopted directly into a shadow root; they are inert in global delivery.
@@ -296,9 +296,9 @@ var RoxyUI_endpoint_form=(()=>{var Z=Object.defineProperty;var Ye=Object.getOwnP
296
296
  }
297
297
  }
298
298
  }
299
- `;var J="roxy-ui-tokens";function Q(){if(typeof document>"u")return null;let i=document.getElementById(J);if(i)return i;let t=document.createElement("style");return t.id=J,t.textContent=We,document.head.prepend(t),t}var X=globalThis,ee=X.ShadowRoot&&(X.ShadyCSS===void 0||X.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,we=Symbol(),Ze=new WeakMap,H=class{constructor(t,e,r){if(this._$cssResult$=!0,r!==we)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(ee&&t===void 0){let r=e!==void 0&&e.length===1;r&&(t=Ze.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&Ze.set(e,t))}return t}toString(){return this.cssText}},Je=i=>new H(typeof i=="string"?i:i+"",void 0,we),A=(i,...t)=>{let e=i.length===1?i[0]:t.reduce((r,s,o)=>r+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+i[o+1],i[0]);return new H(e,i,we)},Qe=(i,t)=>{if(ee)i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let r=document.createElement("style"),s=X.litNonce;s!==void 0&&r.setAttribute("nonce",s),r.textContent=e.cssText,i.appendChild(r)}},Ae=ee?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(let r of t.cssRules)e+=r.cssText;return Je(e)})(i):i;var{is:ar,defineProperty:lr,getOwnPropertyDescriptor:dr,getOwnPropertyNames:cr,getOwnPropertySymbols:ur,getPrototypeOf:pr}=Object,te=globalThis,Xe=te.trustedTypes,hr=Xe?Xe.emptyScript:"",mr=te.reactiveElementPolyfillSupport,z=(i,t)=>i,G={toAttribute(i,t){switch(t){case Boolean:i=i?hr:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch{e=null}}return e}},re=(i,t)=>!ar(i,t),et={attribute:!0,type:String,converter:G,reflect:!1,useDefault:!1,hasChanged:re};Symbol.metadata??=Symbol("metadata"),te.litPropertyMetadata??=new WeakMap;var _=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=et){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let r=Symbol(),s=this.getPropertyDescriptor(t,r,e);s!==void 0&&lr(this.prototype,t,s)}}static getPropertyDescriptor(t,e,r){let{get:s,set:o}=dr(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n}};return{get:s,set(n){let l=s?.call(this);o?.call(this,n),this.requestUpdate(t,l,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??et}static _$Ei(){if(this.hasOwnProperty(z("elementProperties")))return;let t=pr(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(z("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(z("properties"))){let e=this.properties,r=[...cr(e),...ur(e)];for(let s of r)this.createProperty(s,e[s])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[r,s]of e)this.elementProperties.set(r,s)}this._$Eh=new Map;for(let[e,r]of this.elementProperties){let s=this._$Eu(e,r);s!==void 0&&this._$Eh.set(s,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let r=new Set(t.flat(1/0).reverse());for(let s of r)e.unshift(Ae(s))}else t!==void 0&&e.push(Ae(t));return e}static _$Eu(t,e){let r=e.attribute;return r===!1?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Qe(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$ET(t,e){let r=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,r);if(s!==void 0&&r.reflect===!0){let o=(r.converter?.toAttribute!==void 0?r.converter:G).toAttribute(e,r.type);this._$Em=t,o==null?this.removeAttribute(s):this.setAttribute(s,o),this._$Em=null}}_$AK(t,e){let r=this.constructor,s=r._$Eh.get(t);if(s!==void 0&&this._$Em!==s){let o=r.getPropertyOptions(s),n=typeof o.converter=="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute!==void 0?o.converter:G;this._$Em=s;let l=n.fromAttribute(e,o.type);this[s]=l??this._$Ej?.get(s)??l,this._$Em=null}}requestUpdate(t,e,r,s=!1,o){if(t!==void 0){let n=this.constructor;if(s===!1&&(o=this[t]),r??=n.getPropertyOptions(t),!((r.hasChanged??re)(o,e)||r.useDefault&&r.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(n._$Eu(t,r))))return;this.C(t,e,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:r,reflect:s,wrapped:o},n){r&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??e??this[t]),o!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||r||(e=void 0),this._$AL.set(t,e)),s===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[s,o]of this._$Ep)this[s]=o;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[s,o]of r){let{wrapped:n}=o,l=this[s];n!==!0||this._$AL.has(s)||l===void 0||this.C(s,void 0,o,l)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(e)):this._$EM()}catch(r){throw t=!1,this._$EM(),r}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};_.elementStyles=[],_.shadowRootOptions={mode:"open"},_[z("elementProperties")]=new Map,_[z("finalized")]=new Map,mr?.({ReactiveElement:_}),(te.reactiveElementVersions??=[]).push("2.1.2");var _e=globalThis,tt=i=>i,ie=_e.trustedTypes,rt=ie?ie.createPolicy("lit-html",{createHTML:i=>i}):void 0,Re="$lit$",R=`lit$${Math.random().toFixed(9).slice(2)}$`,Oe="?"+R,fr=`<${Oe}>`,P=document,K=()=>P.createComment(""),B=i=>i===null||typeof i!="object"&&typeof i!="function",Ee=Array.isArray,lt=i=>Ee(i)||typeof i?.[Symbol.iterator]=="function",Se=`[
300
- \f\r]`,j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,it=/-->/g,st=/>/g,C=RegExp(`>|${Se}(?:([^\\s"'>=/]+)(${Se}*=${Se}*(?:[^
301
- \f\r"'\`<>=]|("|')|))|$)`,"g"),ot=/'/g,nt=/"/g,dt=/^(?:script|style|textarea|title)$/i,Le=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),h=Le(1),Xr=Le(2),ei=Le(3),$=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),at=new WeakMap,D=P.createTreeWalker(P,129);function ct(i,t){if(!Ee(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return rt!==void 0?rt.createHTML(t):t}var ut=(i,t)=>{let e=i.length-1,r=[],s,o=t===2?"<svg>":t===3?"<math>":"",n=j;for(let l=0;l<e;l++){let c=i[l],u,d,a=-1,m=0;for(;m<c.length&&(n.lastIndex=m,d=n.exec(c),d!==null);)m=n.lastIndex,n===j?d[1]==="!--"?n=it:d[1]!==void 0?n=st:d[2]!==void 0?(dt.test(d[2])&&(s=RegExp("</"+d[2],"g")),n=C):d[3]!==void 0&&(n=C):n===C?d[0]===">"?(n=s??j,a=-1):d[1]===void 0?a=-2:(a=n.lastIndex-d[2].length,u=d[1],n=d[3]===void 0?C:d[3]==='"'?nt:ot):n===nt||n===ot?n=C:n===it||n===st?n=j:(n=C,s=void 0);let f=n===C&&i[l+1].startsWith("/>")?" ":"";o+=n===j?c+fr:a>=0?(r.push(u),c.slice(0,a)+Re+c.slice(a)+R+f):c+R+(a===-2?l:f)}return[ct(i,o+(i[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},V=class i{constructor({strings:t,_$litType$:e},r){let s;this.parts=[];let o=0,n=0,l=t.length-1,c=this.parts,[u,d]=ut(t,e);if(this.el=i.createElement(u,r),D.currentNode=this.el.content,e===2||e===3){let a=this.el.content.firstChild;a.replaceWith(...a.childNodes)}for(;(s=D.nextNode())!==null&&c.length<l;){if(s.nodeType===1){if(s.hasAttributes())for(let a of s.getAttributeNames())if(a.endsWith(Re)){let m=d[n++],f=s.getAttribute(a).split(R),k=/([.?@])?(.*)/.exec(m);c.push({type:1,index:o,name:k[2],strings:f,ctor:k[1]==="."?oe:k[1]==="?"?ne:k[1]==="@"?ae:F}),s.removeAttribute(a)}else a.startsWith(R)&&(c.push({type:6,index:o}),s.removeAttribute(a));if(dt.test(s.tagName)){let a=s.textContent.split(R),m=a.length-1;if(m>0){s.textContent=ie?ie.emptyScript:"";for(let f=0;f<m;f++)s.append(a[f],K()),D.nextNode(),c.push({type:2,index:++o});s.append(a[m],K())}}}else if(s.nodeType===8)if(s.data===Oe)c.push({type:2,index:o});else{let a=-1;for(;(a=s.data.indexOf(R,a+1))!==-1;)c.push({type:7,index:o}),a+=R.length-1}o++}}static createElement(t,e){let r=P.createElement("template");return r.innerHTML=t,r}};function I(i,t,e=i,r){if(t===$)return t;let s=r!==void 0?e._$Co?.[r]:e._$Cl,o=B(t)?void 0:t._$litDirective$;return s?.constructor!==o&&(s?._$AO?.(!1),o===void 0?s=void 0:(s=new o(i),s._$AT(i,e,r)),r!==void 0?(e._$Co??=[])[r]=s:e._$Cl=s),s!==void 0&&(t=I(i,s._$AS(i,t.values),s,r)),t}var se=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:r}=this._$AD,s=(t?.creationScope??P).importNode(e,!0);D.currentNode=s;let o=D.nextNode(),n=0,l=0,c=r[0];for(;c!==void 0;){if(n===c.index){let u;c.type===2?u=new N(o,o.nextSibling,this,t):c.type===1?u=new c.ctor(o,c.name,c.strings,this,t):c.type===6&&(u=new le(o,this,t)),this._$AV.push(u),c=r[++l]}n!==c?.index&&(o=D.nextNode(),n++)}return D.currentNode=P,s}p(t){let e=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}},N=class i{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,s){this.type=2,this._$AH=p,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=I(this,t,e),B(t)?t===p||t==null||t===""?(this._$AH!==p&&this._$AR(),this._$AH=p):t!==this._$AH&&t!==$&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):lt(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!==p&&B(this._$AH)?this._$AA.nextSibling.data=t:this.T(P.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:r}=t,s=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=V.createElement(ct(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===s)this._$AH.p(e);else{let o=new se(s,this),n=o.u(this.options);o.p(e),this.T(n),this._$AH=o}}_$AC(t){let e=at.get(t.strings);return e===void 0&&at.set(t.strings,e=new V(t)),e}k(t){Ee(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,r,s=0;for(let o of t)s===e.length?e.push(r=new i(this.O(K()),this.O(K()),this,this.options)):r=e[s],r._$AI(o),s++;s<e.length&&(this._$AR(r&&r._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let r=tt(t).nextSibling;tt(t).remove(),t=r}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},F=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,s,o){this.type=1,this._$AH=p,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=p}_$AI(t,e=this,r,s){let o=this.strings,n=!1;if(o===void 0)t=I(this,t,e,0),n=!B(t)||t!==this._$AH&&t!==$,n&&(this._$AH=t);else{let l=t,c,u;for(t=o[0],c=0;c<o.length-1;c++)u=I(this,l[r+c],e,c),u===$&&(u=this._$AH[c]),n||=!B(u)||u!==this._$AH[c],u===p?t=p:t!==p&&(t+=(u??"")+o[c+1]),this._$AH[c]=u}n&&!s&&this.j(t)}j(t){t===p?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},oe=class extends F{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===p?void 0:t}},ne=class extends F{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==p)}},ae=class extends F{constructor(t,e,r,s,o){super(t,e,r,s,o),this.type=5}_$AI(t,e=this){if((t=I(this,t,e,0)??p)===$)return;let r=this._$AH,s=t===p&&r!==p||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,o=t!==p&&(r===p||s);s&&this.element.removeEventListener(this.name,this,r),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},le=class{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){I(this,t)}},pt={M:Re,P:R,A:Oe,C:1,L:ut,R:se,D:lt,V:I,I:N,H:F,N:ne,U:ae,B:oe,F:le},gr=_e.litHtmlPolyfillSupport;gr?.(V,N),(_e.litHtmlVersions??=[]).push("3.3.3");var ht=(i,t,e)=>{let r=e?.renderBefore??t,s=r._$litPart$;if(s===void 0){let o=e?.renderBefore??null;r._$litPart$=s=new N(t.insertBefore(K(),o),o,void 0,e??{})}return s._$AI(i),s};var Te=globalThis,L=class extends _{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=ht(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return $}};L._$litElement$=!0,L.finalized=!0,Te.litElementHydrateSupport?.({LitElement:L});var yr=Te.litElementPolyfillSupport;yr?.({LitElement:L});(Te.litElementVersions??=[]).push("4.2.2");var mt=i=>(t,e)=>{e!==void 0?e.addInitializer(()=>{customElements.define(i,t)}):customElements.define(i,t)};var xr={attribute:!0,type:String,converter:G,reflect:!1,hasChanged:re},br=(i=xr,t,e)=>{let{kind:r,metadata:s}=e,o=globalThis.litPropertyMetadata.get(s);if(o===void 0&&globalThis.litPropertyMetadata.set(s,o=new Map),r==="setter"&&((i=Object.create(i)).wrapped=!0),o.set(e.name,i),r==="accessor"){let{name:n}=e;return{set(l){let c=t.get.call(this);t.set.call(this,l),this.requestUpdate(n,c,i,!0,l)},init(l){return l!==void 0&&this.C(n,void 0,i,l),l}}}if(r==="setter"){let{name:n}=e;return function(l){let c=this[n];t.call(this,l),this.requestUpdate(n,c,i,!0,l)}}throw Error("Unsupported decorator location: "+r)};function v(i){return(t,e)=>typeof e=="object"?br(i,t,e):((r,s,o)=>{let n=s.hasOwnProperty(o);return s.constructor.createProperty(o,r),n?Object.getOwnPropertyDescriptor(s,o):void 0})(i,t,e)}function S(i){return v({...i,state:!0,attribute:!1})}var b=i=>i??p;var M={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},ft=i=>(...t)=>({_$litDirective$:i,values:t}),ce=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,r){this._$Ct=t,this._$AM=e,this._$Ci=r}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var{I:Bi}=pt;var gt=i=>i.strings===void 0;var vr={},yt=(i,t=vr)=>i._$AH=t;var xt=ft(class extends ce{constructor(i){if(super(i),i.type!==M.PROPERTY&&i.type!==M.ATTRIBUTE&&i.type!==M.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!gt(i))throw Error("`live` bindings can only contain a single expression")}render(i){return i}update(i,[t]){if(t===$||t===p)return t;let e=i.element,r=i.name;if(i.type===M.PROPERTY){if(t===e[r])return $}else if(i.type===M.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(r))return $}else if(i.type===M.ATTRIBUTE&&e.getAttribute(r)===t+"")return $;return yt(i),t}});var Y={afterSunset:"Born after sunset",allowDuplicates:"Allow duplicate cards",allowReversals:"Allow reversed cards",angelDating:"How the name of the day is dated",annualFromYear:"Annual pillars from year",annualYears:"Years of annual pillars",approximateDate:"Approximate date",aspectTypes:"Aspect types",atbashOutput:"AtBash and Albam output",avasthaInfo:"Include avastha details",avoidAnimal:"Avoid clashes with",ayadiText:"Ayadi text family",ayanamsaValue:"Custom ayanamsa value",birthData:"Birth details",birthDate:"Birth date",birthLatitude:"Birth latitude",birthLongitude:"Birth longitude",birthTime:"Birth time",ciphers:"Ciphers to return",context:"Where you saw it",coordinateSystem:"Coordinate system",correlation:"Correlation constant",count:"How many",currentYear:"Year",cuts:"Cut corners",dasha:"Dasha lords",datetime:"Date and time",dayBoundary:"Day boundary",depth:"Depth, north to south",directionScheme:"Direction reading",division:"Divisional chart",domainWeights:"Domain weights",door:"Door coordinates",doorPosition:"Door position along the side",doshaClock:"How the dosha periods are cut",endDate:"End date",endDatetime:"End date and time",expression:"Expression number",extensions:"Extended corners",facing:"Facing direction",facingDegrees:"Facing degrees",family:"Yoga family",firstName:"First name",firstNameHebrew:"First name in Hebrew",fullName:"Full name",gainHouses:"Gain houses",grid:"Mandala grid",hastaInches:"Length of one hasta in inches",horaryNumber:"Horary number",hourClock:"Hour clock",houseSystem:"House system",id:"ID",include:"Additional bodies",includeMatches:"Include equal value matches",interpretation:"Position meaning",intervalMinutes:"Interval in minutes",isLeapMonth:"Leap month",iso2:"Country code",kua:"Kua number",lang:"Language",latinCiphers:"Also score the Latin ciphers",leapDayPolicy:"Where 29 February falls",letter:"Starting letter",letterAttribution:"Letter attribution reading",lifePath:"Life Path number",limit:"Results per page",lines:"Line pattern",lossHouses:"Loss houses",lunarDay:"Lunar day",lunarMonth:"Lunar month",lunarYear:"Lunar year",members:"Group members",minSignificance:"Minimum significance",minStrength:"Minimum strength",misparGadol:"Mispar gadol method",modernPlanets:"Include modern planets",moonWindows:"Moon windows",muhurtaText:"Muhurta text",nameHebrew:"Name in Hebrew",natalChart:"Natal chart",nodeType:"Lunar node type",offset:"Results to skip",polygon:"Outline",positions:"Spread positions",q:"Search",question:"Your question",relocationLatitude:"Relocation latitude",relocationLongitude:"Relocation longitude",returnDate:"Return date",returnYear:"Return year",ritucharyaScheme:"Season division",rituZodiac:"Zodiac the season boundaries are measured in",road:"Road side",rulingPlanets:"Ruling planets",scheme:"Karaka scheme",secondName:"Second name",secondNameHebrew:"Second name in Hebrew",sephirotSystem:"Sephirot reading",sign:"Zodiac sign",sign1:"First animal sign",sign2:"Second animal sign",signDoshaScheme:"Sign humour table",significators:"Include KP significators",slopeLowDirection:"Direction the ground falls toward",slopeSchool:"Ground level school",soulUrge:"Soul Urge number",spreadName:"Spread name",startDate:"Start date",startDatetime:"Start date and time",strictOrbs:"Use tighter orbs",system:"Avastha system",targetDate:"Target date",targetMonth:"Target month",text:"Word or name",textHebrew:"Hebrew word or name",top:"Top events per window",transitDate:"Transit date",transitTime:"Transit time",transliteration:"Transliteration scheme",treeVariant:"Tree arrangement",type:"Pattern type",vyayaFormula:"Vyaya formula",water:"Standing water direction",weights:"Layer weights",width:"Width, east to west",x:"Distance east",y:"Distance north",yearBearerSystem:"Year Bearer school",yearBoundary:"Year boundary",yearStart:"Wheel year start",zodiac:"Zodiac sign"};var bt=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function De(i){if(i.lang)return i.lang;if(typeof document>"u")return;let t=i.closest?.("[lang]")?.getAttribute("lang");return t||document.documentElement.lang||void 0}var kr={tw:"hant",hk:"hant",mo:"hant",cn:"hans",sg:"hans",my:"hans"};function Ce(i){let t=i.toLowerCase();return bt.find(e=>e.toLowerCase()===t)}function vt(i){let t=De(i);if(!t)return;let e=Ce(t);if(e)return e;let r=t.toLowerCase().split("-"),s=r[0];if(s==="zh"){let o=r.find(n=>n==="hans"||n==="hant")??kr[r[1]??""];return o?Ce(`zh-${o}`):void 0}return Ce(s)}function ue(i){return i.toLowerCase().replace(/[\s_-]+/g," ").trim()}function O(i){return i.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([a-z])([0-9])/g,"$1 $2").replace(/^\w/,t=>t.toUpperCase())}var kt="__ROXY_UI_I18N__";function Pe(){let i=globalThis,t=i[kt];if(t)return t;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return i[kt]=e,e}function Ie(i,t){return t?i.replace(/\{\{(\w+)\}\}/g,(e,r)=>r in t?String(t[r]??""):e):i}function $t(i,t,e){return Ie(wt(i,t)??t,e)}function wt(i,t){if(!i)return;let{catalogs:e}=Pe(),r=i.toLowerCase();return(e[r]??e[r.split("-")[0]])?.[ue(t)]}function At(i){if(!i)return;let{fieldLabels:t}=Pe(),e=i.toLowerCase();return t[e]??t[e.split("-")[0]]}function Fe(i,t){return At(i)?.fields[t]}function St(i,t,e){return At(i)?.enums[`${t}.${e}`]}function _t(i){let{listeners:t}=Pe();return t.add(i),()=>{t.delete(i)}}var pe=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){this.unsubscribe=_t(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var he=class extends L{constructor(){super();this.translator=(e,r)=>this.t(e,r);new pe(this)}t(e,r){return $t(this.effectiveLang(),e,r)}effectiveLang(){return De(this)}};var $r=(i,t)=>t?i[ue(t)]:void 0;var wr={aries:"♈",taurus:"♉",gemini:"♊",cancer:"♋",leo:"♌",virgo:"♍",libra:"♎",scorpio:"♏",sagittarius:"♐",capricorn:"♑",aquarius:"♒",pisces:"♓"},Rt=i=>$r(wr,i);var Ot=["Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius","Capricorn","Aquarius","Pisces"];var Et=A`:host{--roxy-label-col:minmax(0, 25%);--_success-fg:var(--roxy-success-fg,#09632a);--_warning-fg:var(--roxy-warning-fg,#913304);--_danger-fg:var(--roxy-danger-fg,#881313);--_info-fg:var(--roxy-info-fg,#014f7a);font-family:var(--roxy-font-sans,system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-base,1rem);line-height:var(--roxy-leading-normal,1.5);animation:roxy-fade-in var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1)) both;background:0 0;display:block;container-type:inline-size}:host([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,var(--roxy-font-sans,system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif))}@keyframes roxy-fade-in{0%{transform:translateY(2px)}to{transform:translateY(0)}}@media (prefers-reduced-motion:reduce){:host{animation:none}}.roxy-skeleton{background:linear-gradient(90deg, var(--roxy-border,#e4e4e7) 0%, color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent) 50%, var(--roxy-border,#e4e4e7) 100%);border-radius:var(--roxy-radius-md,8px);background-size:200% 100%;animation:1.4s ease-in-out infinite roxy-shimmer}@keyframes roxy-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media (prefers-reduced-motion:reduce){.roxy-skeleton{animation:none}}.roxy-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,1.5rem);color:var(--roxy-muted,#71717a);text-align:center;font-size:var(--roxy-text-sm,.875rem)}.roxy-error{gap:var(--roxy-space-sm,.5rem);padding:var(--roxy-space-lg,1.5rem);background:var(--roxy-surface,#fff);border:1px solid var(--roxy-danger,#dc2626);border-radius:var(--roxy-radius-md,8px);color:var(--_danger-fg);font-size:var(--roxy-text-sm,.875rem);justify-items:start;display:grid}:host(:focus-within) .roxy-card{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}.roxy-attribution{margin-top:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-align:right}.roxy-attribution a{color:inherit;text-decoration:none}.roxy-attribution a:hover{color:var(--roxy-accent-ink,#b45309);text-decoration:underline}.roxy-attribution a:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}.roxy-edit-bar{margin-bottom:var(--roxy-space-sm,.5rem);justify-content:flex-end;display:flex}.roxy-edit{padding:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);color:var(--roxy-fg,#0a0a0a);font-family:inherit;font-size:var(--roxy-text-sm,.875rem);cursor:pointer;background:0 0}.roxy-edit:hover{border-color:var(--roxy-accent,#f59e0b);color:var(--roxy-accent-ink,#b45309)}.roxy-edit:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}.roxy-edit:disabled{cursor:progress;color:var(--roxy-muted,#71717a)}roxy-endpoint-form+*{margin-top:var(--roxy-space-md,1rem)}.roxy-more{justify-items:center;gap:var(--roxy-space-sm,.5rem);margin-top:var(--roxy-space-md,1rem);display:grid}.roxy-more .roxy-edit{min-height:44px}:host{font-variant-emoji:text}`;function Me(){return h`<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 Lt=A`summary{list-style:none}summary::-webkit-details-marker{display:none}.roxy-chevron{aspect-ratio:auto;width:14px;height:14px;color:var(--roxy-muted,#71717a);transition:transform var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,ease);flex-shrink:0}details[open]>summary .roxy-chevron{transform:rotate(180deg)}@media (prefers-reduced-motion:reduce){.roxy-chevron{transition:none}}`;var Ar="pk_live_YOUR_KEY",Tt={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 W(i){if(i)return i===Ar?Tt.sample:i.startsWith("pk_")?void 0:Tt.secret}function qe(i,t,e={}){e.warn&&console.warn(t.message),i.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:t.reason,message:t.message},bubbles:!0,composed:!0}))}var Sr="https://roxyapi.com/api/v2";async function _r(i){try{let t=await i.json();if(t?.error){let e=t.code==="validation_error"&&Array.isArray(t.issues)?t.issues.filter(r=>typeof r.path=="string"&&typeof r.message=="string").map(r=>({path:r.path,message:r.message})):null;return{message:t.error,issues:e?.length?e:null,worded:!0}}}catch{}return{message:`Request failed (${i.status})`,issues:null,worded:!1}}var me=class extends Error{constructor(e,r=null,s=!0){super(e);this.issues=r;this.worded=s}};function Ct(i){return i.submitUrl?void 0:W(i.publishableKey)}function Ue(i){return!!(i.submitUrl||i.publishableKey&&!Ct(i))}async function Ne(i,t,e){let r=Ct(i);if(r)throw new me(r.message);let s=i.submitUrl?await fetch(i.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:Rr(t,i.submitContext),signal:e}):await Or(i,t,e);if(!s.ok){let o=await _r(s);throw new me(o.message,o.issues,o.worded)}return await s.json()}function Rr(i,t){return JSON.stringify(t?{...i,context:t}:i)}function Or(i,t,e){let r=new URL(`${i.baseUrl??Sr}${t.path}`,document.baseURI);for(let[o,n]of Object.entries(t.query??{}))n!=null&&r.searchParams.set(o,String(n));let s={Accept:"application/json"};return i.publishableKey&&(s["X-API-Key"]=i.publishableKey),t.body!=null&&(s["Content-Type"]="application/json"),fetch(r,{method:t.method??"GET",headers:s,body:t.body!=null?JSON.stringify(t.body):void 0,signal:e})}var Dt={"GET /angel-numbers/numbers/{number}":{number:{path:"/angel-numbers/numbers",limit:50,lang:!0}},"GET /astrology/planet-meanings/{id}":{id:{path:"/astrology/planet-meanings",lang:!0}},"GET /astrology/signs/{id}":{id:{path:"/astrology/signs",lang:!0}},"GET /crystals":{color:{path:"/crystals/colors",lang:!0},planet:{path:"/crystals/planets",lang:!0}},"GET /crystals/{id}":{id:{path:"/crystals",limit:100,lang:!0}},"GET /dreams/symbols":{letter:{path:"/dreams/symbols/letters"}},"GET /dreams/symbols/{id}":{id:{path:"/dreams/symbols",search:"q",limit:50}},"GET /iching/trigrams/{id}":{id:{path:"/iching/trigrams",lang:!0}},"GET /tarot/cards/{id}":{id:{path:"/tarot/cards",limit:100,lang:!0}}},Pt={"GET /tarot/cards":{suit:{field:"arcana",value:"major"}}};var w=(i,t)=>`${i}.${t}`;function ge(i){let t=/^(.+)\.(\d+)$/.exec(i);return t?{key:t[1],index:Number(t[2])}:null}function ye(i,t=Ie,e=r=>Y[r]??O(r)){let r=ge(i);return r?t("{{group}} {{n}}",{group:e(r.key),n:r.index+1}):t(O(i))}function Ft(i,t,e){let r=w(t,0);return i.filter(s=>s.group===r).map(s=>({...s,key:`${w(t,e)}.${s.name}`,group:w(t,e)}))}function ze(i){return i.length<=(xe(i)?30:12)?"tiles":"select"}function xe(i){return i.every(t=>t.length<=2)}var Er=["latitude","longitude","timezone"],It=["latitude","longitude"];function Lr(i){let t=i.match(/^(.+?)(Latitude|Longitude)$/);return t?{group:t[1],leaf:t[2].toLowerCase()}:null}var Tr=Ot.map(i=>i.toLowerCase());function q(i,t){if(i){if("$ref"in i&&i.$ref){let e=i.$ref.split("/").pop();return e?t[e]:void 0}return i}}function Mt(i){let t=i.anyOf??i.oneOf;return!t||t.length===0?i:t.find(e=>Array.isArray(e.enum))??t.find(e=>He(e)&&He(e)!=="null")??t[0]??i}function He(i){if(typeof i.type=="string")return i.type;if(!Array.isArray(i.type))return;let t=i.type.filter(e=>e!=="null");return t.length===1?t[0]:void 0}function Cr(i){let t=Mt(i),e=He(t);return Array.isArray(t.enum)?ze(t.enum):e==="boolean"?"toggle":t.format==="date"?"date":t.format==="time"?"time":t.format==="date-time"?"datetime":e==="integer"||e==="number"?"number":e==="string"?"text":e==="array"?"array":null}function qt(i){if(i.length!==12)return!1;let t=new Set(i.map(e=>e.toLowerCase()));return Tr.every(e=>t.has(e))}function fe(i,t,e){let r=Mt(t);return{key:e.key,name:i,group:e.group,inQuery:e.inQuery,kind:Cr(t)??"text",required:e.required,description:r.description??t.description,enum:r.enum,min:r.minimum??r.exclusiveMinimum,max:r.maximum??r.exclusiveMaximum,default:t.default??r.default,example:t.example??r.example}}function Ut(i,t,e,r=i.requestBody?"POST":"GET"){let s=[],o=[],n=!1,l=i.requestBody?.content?.["application/json"]?.schema,c=q(l,t),u=i["x-required-any-of"];if(c?.properties){let d=new Set([...c.required??[],...u?.[0]??[]]);for(let[a,m]of Object.entries(c.properties)){let f=q(m,t)??{},k=f.type==="array"?q(f.items,t):void 0;if(k?.type==="object"&&k.properties){let y=Math.max(1,f.minItems??1),E=new Set(k.required??[]);o.push({key:a,min:y,max:f.maxItems??y});for(let U=0;U<y;U++)for(let[T,er]of Object.entries(k.properties)){let tr=q(er,t)??{};s.push(fe(T,tr,{key:`${w(a,U)}.${T}`,group:w(a,U),required:d.has(a)&&E.has(T)}))}}else if(f.type==="object"&&f.properties){let y=new Set(f.required??[]);for(let[E,U]of Object.entries(f.properties)){let T=q(U,t)??{};T.type==="array"&&q(T.items,t)?.type==="object"||s.push(fe(E,T,{key:`${a}.${E}`,group:a,required:d.has(a)&&y.has(E)}))}}else{let y=Lr(a),E=fe(y?.leaf??a,f,{key:a,group:y?.group,required:d.has(a)});y&&(E.label=`${O(y.group)} ${y.leaf}`),s.push(E)}}}for(let d of i.parameters??[]){if(d.in!=="path"&&d.in!=="query")continue;if(d.name==="lang"&&d.in==="query"){n=!0;continue}let a=q(d.schema,t)??{},m=fe(d.name,a,{key:d.name,required:!!d.required,inQuery:d.in==="query"});if(d.in==="path"&&m.enum&&/^(id|identifier|slug)$/i.test(Y[m.name]??O(m.name))){let f=/^([A-Za-z][A-Za-z -]*?)\s+(?:id|identifier|slug)\b/i.exec(d.description??m.description??"")?.[1]?.trim();f&&(m.label=f)}s.push(m)}return Ge({title:Dr(i.summary,e),fields:s,hasLang:n,...o.length>0?{repeats:o}:{},...u?{requiredAnyOf:u}:{}},r,e)}function Ge(i,t,e){let r=`${t.toUpperCase()} /${e.replace(/^\//,"")}`,s=Dt[r]??{},o=Pt[r]??{},n=i.fields.map(a=>{let m={...a};return delete m.role,delete m.city,delete m.fold,{...m,...s[a.key]&&{source:s[a.key]},...o[a.key]&&{disabledWhen:o[a.key]}}}),l=[...new Set(n.map(a=>a.group))].map(a=>a===void 0?{}:{key:a,label:ye(a)}),c=l.filter(a=>It.every(m=>n.some(f=>f.group===a.key&&f.name===m)));for(let[a,m]of c.entries()){let f=n.filter(y=>y.group===m.key),k=f.find(y=>y.name==="timezone")??(a===0?n.find(y=>!y.group&&y.name==="timezone"):void 0);m.location={fields:[...f.filter(y=>It.includes(y.name)).map(y=>y.key),...k?[k.key]:[]],required:f.some(y=>Er.includes(y.name)&&y.required)}}for(let a of n)a.name==="seed"?a.role="seed":(a.name==="limit"||a.name==="offset")&&!a.required?a.role="hidden-default":c.some(m=>m.location?.fields.includes(a.key))?a.role="location":a.name==="timezone"&&(a.city=!0);let u=l.filter(a=>a.key!==void 0&&(a.location||n.some(m=>m.group===a.key&&m.required))),d=n.some(a=>!a.group&&!a.role&&a.required)||u.length>0||c.some(a=>a.key===void 0);for(let a of l)a.key!==void 0&&d&&!u.includes(a)&&(a.fold=!0);for(let a of n)(a.group?l.find(m=>m.key===a.group)?.fold:!a.role&&(d?!a.required:a.default!==void 0))&&(a.fold=!0);return{...i,fields:n,groups:l,opensOnLoad:Pr(i,t)}}function Dr(i,t){let e=i?.split(" - ")[0]?.trim();return e||O(t.split("/").pop()??"")}function Pr(i,t){return t.toUpperCase()==="GET"&&!i.fields.some(e=>e.required)}function Nt(i,t=[]){if(t.some(r=>r.name==="limit"||r.name==="offset"))return"Search";let e=i.toLowerCase();return/compat|synastry|guna|connection|penta|composite/.test(e)?"Compare":/\bcast\b|\/draw|iching|hexagram|tarot/.test(e)?"Cast":/horoscope|dream|angel|nakshatra|crystal|meaning|reference/.test(e)?"Get reading":"Generate"}function Ht(i,t){let e=t.replace(/^\//,"").replace(/[{}]/g,"").replace(/\//g,"-");return`${i.toLowerCase()}--${e}.json`}function Ir(i){if(Array.isArray(i))return i;if(!i||typeof i!="object")return null;let t=Object.values(i),e=t.find(Array.isArray);return e||(t.find(s=>!!s&&typeof s=="object"&&Object.values(s).every(o=>typeof o=="number"))??null)}function je(i,t="id"){let e=Ir(i);if(!e)return[];if(!Array.isArray(e)){let s=Object.keys(e),o=s.length>0&&s.every(l=>/^[a-z]$/.test(l));return(o?[..."abcdefghijklmnopqrstuvwxyz"]:s).map(l=>({value:l,label:o?l.toUpperCase():l,disabled:!e[l]}))}let r=[];for(let s of e){if(typeof s=="string"){r.push({value:s,label:s});continue}if(!s||typeof s!="object")continue;let o=s,n=o.id??o[t]??o.number;if(n==null)continue;let l=String(n),c=o.name??o.english;r.push({value:l,label:typeof c=="string"?c:l})}return r}function zt(i){let t=i?.total;return typeof t=="number"?t:void 0}function Gt(i,t,e){return Fe(i,t)??e??O(t)}function jt(i,t,e,r){return St(i,t,e)??r??O(e)}var Kt=A`.spinner{border:2px solid var(--roxy-muted,#71717a);border-top-color:#0000;border-radius:50%;width:14px;height:14px;animation:.7s linear infinite roxy-spin;position:absolute;top:50%;right:12px;transform:translateY(-50%)}@keyframes roxy-spin{to{transform:translateY(-50%)rotate(360deg)}}@media (prefers-reduced-motion:reduce){.spinner{animation:none}}.results{z-index:50;padding:var(--roxy-space-xs,.25rem);background:var(--roxy-bg,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);box-shadow:var(--roxy-shadow-md);max-height:22rem;animation:roxy-fade-in var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1));margin:0;list-style:none;position:absolute;top:calc(100% + 4px);left:0;right:0;overflow-y:auto}.option{align-items:center;gap:var(--roxy-space-sm,.5rem);width:100%;padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);border-radius:var(--roxy-radius-sm,6px);text-align:left;font-family:inherit;font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);cursor:pointer;transition:background-color var(--roxy-motion-duration,.2s);background:0 0;border:0;display:flex}.option:hover,.option[aria-selected=true]{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 10%, transparent)}.empty{padding:var(--roxy-space-md,1rem);color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}`;function Bt(i,t){let e,r=((...s)=>{e&&clearTimeout(e),e=setTimeout(()=>{e=void 0,i(...s)},t)});return r.cancel=()=>{e&&(clearTimeout(e),e=void 0)},r}var Fr=10,Mr=10,Ke=new Map;function Vt(i,t,e={}){return{...i.limit?{limit:i.limit}:{},...i.lang&&t?{lang:t}:{},...e}}function Ve(i,t,e,r){let s=JSON.stringify([i.submitUrl??i.baseUrl,t.path,e,r]),o=Ke.get(s);return o||(o=qr(i,t,e,r).catch(n=>{throw Ke.delete(s),n}),Ke.set(s,o)),o}async function qr(i,t,e,r){let s=[];for(let o=0;o<Mr;o++){let n=await Ne(i,{path:t.path,method:"GET",query:Vt(t,r,s.length?{offset:s.length}:{})}),l=je(n,e);s.push(...l);let c=zt(n);if(!t.limit||c===void 0||s.length>=c||!l.length)break}return s}var Be=i=>i.normalize("NFD").replace(new RegExp("\\p{M}","gu"),"").toLowerCase(),be=class{constructor(t,e,r,s,o){this.host=t;this.source=e;this.field=r;this.context=s;this.onPick=o;this.query="";this.options=[];this.open=!1;this.highlight=-1;this.loading=!1;this.error=null;this.search=Bt(t=>{this.searchServer(t)},250);t.addController(this)}hostDisconnected(){this.search.cancel(),this.abort?.abort()}input(t){this.query=t,this.error=null,this.source.search?t.trim().length<2?this.close():this.search(t):this.filter(t),this.host.requestUpdate()}focus(){!this.source.search&&!this.open&&this.filter(this.query)}close(){this.open=!1,this.highlight=-1,this.host.requestUpdate()}pick(t){this.query=t.label,this.close(),this.onPick(t)}keydown(t){let e=this.options.length;if(t.key==="Escape"){this.close();return}if(t.key==="ArrowDown"&&!this.open){t.preventDefault(),this.input(this.query);return}if(!(!this.open||e===0)){if(t.key==="ArrowDown")this.highlight=(this.highlight+1)%e;else if(t.key==="ArrowUp")this.highlight=(this.highlight-1+e)%e;else if(t.key==="Home")this.highlight=0;else if(t.key==="End")this.highlight=e-1;else if(t.key==="Enter"){let r=this.options[this.highlight]??this.options[0];r&&this.pick(r)}else return;t.preventDefault(),this.host.requestUpdate()}}async filter(t){let{route:e,lang:r}=this.context();this.loading=!0,this.host.requestUpdate();try{let s=await Ve(e,this.source,this.field,r);if(t!==this.query)return;let o=Be(t.trim());this.show(s.filter(n=>Be(n.label).includes(o)||Be(n.value).includes(o)))}catch(s){this.fail(s)}finally{this.loading=!1,this.host.requestUpdate()}}async searchServer(t){let{route:e,lang:r}=this.context(),s=this.source.search;this.abort?.abort();let o=new AbortController;this.abort=o,this.loading=!0,this.host.requestUpdate();try{let n=await Ne(e,{path:this.source.path,method:"GET",query:Vt({...this.source,limit:Fr},r,{[s]:t})},o.signal);if(o.signal.aborted)return;this.show(je(n,this.field))}catch(n){if(o.signal.aborted)return;this.fail(n)}finally{this.abort===o&&(this.abort=void 0),o.signal.aborted||(this.loading=!1,this.host.requestUpdate())}}show(t){this.options=t,this.open=!0,this.highlight=t.length?0:-1}fail(t){this.options=[],this.open=!1,this.error=t instanceof Error?t.message:String(t)}};function Yt(i,t,e,r={}){let s=`${t}-listbox`;return h`<div class="picker"><input id="${t}" type="text" role="combobox" aria-expanded="${i.open?"true":"false"}" aria-controls="${s}" aria-autocomplete="list" aria-labelledby="${b(r.labelledby)}" aria-describedby="${b(r.describedby)}" aria-invalid="${b(r.invalid?"true":void 0)}" aria-activedescendant="${i.open&&i.highlight>=0?`${t}-opt-${i.highlight}`:""}" autocomplete="off" placeholder="${e.placeholder}" .value="${i.query}" @input="${o=>i.input(o.target.value)}" @keydown="${o=>i.keydown(o)}" @focus="${()=>i.focus()}" @blur="${()=>i.close()}"> ${i.loading?h`<span class="spinner" role="status" aria-label="${e.loading}"></span>`:p} ${i.open?h`<ul id="${s}" class="results" role="listbox">${i.options.length===0?h`<li class="empty" role="status">${e.empty}</li>`:i.options.map((o,n)=>h`<li id="${`${t}-opt-${n}`}" class="option" role="option" aria-selected="${i.highlight===n?"true":"false"}" @mousedown="${l=>l.preventDefault()}" @click="${()=>i.pick(o)}">${o.label}</li>`)}</ul>`:p}</div>${i.error?h`<small class="field-error" role="alert">${i.error}</small>`:p}`}var Wt=[Kt,A`.picker{position:relative}`];var Zt="0.53.0";var Jt="https://roxyapi.com/api/v2/openapi.json",Ur=`https://cdn.jsdelivr.net/npm/@roxyapi/ui@${Zt}/dist/schemas`,ve=new Map,ke=class extends Error{constructor(e){super(`HTTP ${e}`);this.status=e}},$e=class extends Error{constructor(e,r){super(`Endpoint ${e} ${r} not found in OpenAPI spec`);this.method=e;this.path=r}};function Nr(){ve.clear()}async function Hr(i){let t=ve.get(i);return t||(t=fetch(i).then(async e=>{if(!e.ok)throw new ke(e.status);return await e.json()}).catch(e=>{throw ve.delete(i),e}),ve.set(i,t)),t}function zr(){return globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2)}var Qt=i=>/\bbirth/i.test(i?.description??""),Xt=i=>i.key===`${i.group}.${i.name}`;function Gr(i){let t=i.trim();if(!t)return[];try{let e=JSON.parse(t);if(Array.isArray(e))return e}catch{}return t.split(",").map(e=>e.trim()).filter(Boolean)}var g=class extends he{constructor(){super(...arguments);this.endpoint="vedic-astrology/birth-chart";this.method="POST";this.specUrl="";this.submitLabel="";this.serverIssues=null;this.autoload=!1;this.fullPages=!1;this.choices={};this.pickers=new Map;this.clearedIssues=new Set;this.fields=[];this.groups=[];this.modelOpensOnLoad=!1;this.repeats=[];this.formTitle="";this.hasLang=!1;this.values={};this.loaded=!1;this.specError=null;this.validationErrors=[];this.retryLoadSchema=()=>{this.loaded=!1,this.specError=null,this.loadSchema()};this.onSubmit=e=>{e.preventDefault(),this.submit()}}connectedCallback(){super.connectedCallback(),this.loadSchema()}async loadSchema(){this.specError=null;try{this.applyModel(await this.resolveModel())}catch(e){this.specError=this.specErrorMessage(e),this.loaded=!0,this.dispatchEvent(new CustomEvent("roxy-spec-error",{detail:{url:this.specUrl||Jt,message:e instanceof Error?e.message:String(e)},bubbles:!0,composed:!0}))}}specErrorMessage(e){return e instanceof ke?this.t("HTTP error {{status}}",{status:e.status}):e instanceof $e?this.t("Endpoint {{method}} {{path}} not found in OpenAPI spec",{method:e.method,path:e.path}):e instanceof Error?e.message:String(e)}async resolveModel(){return this.specUrl?this.modelFromSpec(this.specUrl):await this.tryLoadSlice()??this.modelFromSpec(Jt)}async modelFromSpec(e){let r=await Hr(e),s=`/${this.endpoint.replace(/^\//,"")}`,o=r.paths?.[s]?.[this.method.toLowerCase()];if(!o)throw new $e(this.method,s);return Ut(o,r.components?.schemas??{},this.endpoint,this.method)}async tryLoadSlice(){try{let e=await fetch(`${Ur}/${Ht(this.method,this.endpoint)}`);return e.ok?await e.json():null}catch{return null}}applyModel(e){(!e.groups||e.opensOnLoad===void 0)&&(e=Ge(e,this.method,this.endpoint)),this.fields=e.fields,this.groups=e.groups??[],this.modelOpensOnLoad=e.opensOnLoad??!1,this.repeats=e.repeats??[],this.formTitle=e.title,this.hasLang=e.hasLang;let r={};for(let s of e.fields){let o=this.fullPages&&s.name==="limit"&&this.roleOf(s)==="hidden-default"?s.max??s.default:s.default;o!==void 0&&(r[s.key]=o);let n=s.group&&Xt(s)?this.initialValues?.[s.group]?.[s.name]:this.initialValues?.[s.key];n!==void 0&&(r[s.key]=n)}this.values=this.withoutDisabled(r),this.loaded=!0,this.loadChoices(),this.autoload&&this.opensOnLoad&&Ue(this.route)&&this.updateComplete.then(()=>this.submit())}get route(){return this.apiRoute??{publishableKey:this.publishableKey}}loadChoices(){for(let r of this.pickers.values())this.removeController(r);if(this.pickers.clear(),!Ue(this.route))return;let e=()=>({route:this.route,lang:this.requestLang()});for(let r of this.fields)if(r.source){if(r.required){let s=new be(this,r.source,r.name,e,o=>this.pickChoice(r,o.value));s.query=String(this.values[r.key]??""),this.pickers.set(r.key,s);continue}this.choices={...this.choices,[r.key]:"loading"},Ve(this.route,r.source,r.name,this.requestLang()).then(s=>{this.choices={...this.choices,[r.key]:s}},()=>{let{[r.key]:s,...o}=this.choices;this.choices=o})}}setValue(e,r){this.setValues({[e]:r})}setValues(e){this.values=this.withoutDisabled({...this.values,...e});let r=Object.keys(e).filter(s=>this.serverIssues?.some(o=>o.path===s));r.length&&(this.clearedIssues=new Set([...this.clearedIssues,...r]))}isDisabled(e,r=this.values){let s=e.disabledWhen;return!!s&&r[s.field]===s.value}withoutDisabled(e){for(let r of this.fields)this.isDisabled(r,e)&&(e[r.key]=void 0);return e}willUpdate(e){e.has("serverIssues")&&(this.clearedIssues=new Set);let r=e.has("publishableKey")?W(this.publishableKey):void 0;r&&qe(this,r,{warn:!0})}liveIssues(){return(this.serverIssues??[]).filter(e=>!this.clearedIssues.has(e.path))}issueFor(e){return this.liveIssues().find(r=>r.path===e.key)}cityIssues(e){return this.liveIssues().filter(r=>{let s=this.fields.find(o=>o.key===r.path);return!!s&&this.roleOf(s)==="location"&&this.cityGroup(s)===e})}issuesForGroup(e){return this.liveIssues().filter(r=>r.path===e)}fieldLabel(e){return this.roleOf(e)==="location"||e.city?this.locationLabel(this.cityGroup(e)):e.group?`${this.groupName(e.group)} ${this.fieldText(e.name,e.label)}`:this.fieldText(e.name,e.label)}issueLines(e){return e.map(r=>h`<small part="field-error" class="field-error" role="alert">${r.message}</small>`)}fieldIssue(e){let r=this.issueFor(e);return r?h`<small part="field-error" class="field-error" id="${`roxy-form-${e.key}-error`}" role="alert">${r.message}</small>`:p}renderIssueSummary(){let e=this.liveIssues();if(e.length===0)return p;let r=s=>{let o=this.fields.find(l=>l.key===s);if(o)return this.fieldLabel(o);let n=this.groupKeys().find(l=>l===s);return n?this.groupName(n):this.fieldText(s.split(".")[0]??s)};return h`<div part="validation-error" class="validation-error" role="alert">${e.map(s=>h`<div><strong>${r(s.path)}</strong> ${s.message}</div>`)}</div>`}roleOf(e){return e.role??"normal"}isRendered(e){return this.roleOf(e)==="normal"}groupKeys(){return this.groups.map(e=>e.key)}groupHasLocation(e){return!!this.groups.find(r=>r.key===e)?.location}cityGroup(e){return this.groups.find(r=>r.location?.fields.includes(e.key))?.key??e.group}placeField(e){let r=this.fields.filter(s=>s.group===e);return r.find(s=>s.name==="latitude")??r.find(s=>s.name==="timezone")}locationRequired(e){return this.groups.find(r=>r.key===e)?.location?.required??!1}get soleChoice(){if(this.groupKeys().some(s=>this.groupHasLocation(s))||this.groupKeys().some(s=>s!==void 0))return null;let e=this.fields.filter(s=>s.required&&this.isRendered(s)),r=e[0];return e.length!==1||!r?null:r.kind==="tiles"||r.kind==="select"||this.pickers.has(r.key)?r:null}get opensOnLoad(){return this.modelOpensOnLoad}isFilter(e){return this.opensOnLoad&&!e.required&&!!(e.enum||e.source)}get selfSubmits(){if(this.soleChoice)return!0;if(!this.opensOnLoad)return!1;let e=this.fields.filter(r=>this.isRendered(r));return e.length>0&&e.every(r=>this.isFilter(r))}choiceKind(e){let r=this.choicesOf(e).map(s=>s.value);return this.isFilter(e)&&!xe(r)?"select":this.choices[e.key]?ze(r):e.kind}choicesOf(e){let r=this.choices[e.key];return Array.isArray(r)?r:(e.enum??[]).map(s=>({value:s,label:this.optionText(e.name,s)}))}effectiveSubmitLabel(){return this.submitLabel||this.t(Nt(this.endpoint,this.fields))}requestLang(){return vt(this)}fieldText(e,r){return r||Gt(this.requestLang(),e,Y[e])}optionText(e,r){return jt(this.requestLang(),e,r)}onLocationFor(e){return r=>{let s=this.groups.find(n=>n.key===e)?.location?.fields??[],o={};for(let n of s){let l=this.fields.find(c=>c.key===n)?.name;l&&(o[n]=r[l])}this.setValues(o)}}chooseOption(e,r){if(this.isFilter(e)){this.setFilter(e,this.values[e.key]===r?"":r),this.submit();return}this.pickChoice(e,r)}pickChoice(e,r){this.setValue(e.key,r),r&&this.soleChoice?.key===e.key&&this.submit()}setFilter(e,r){let s={[e.key]:r};for(let o of this.fields)o!==e&&(this.isFilter(o)||this.opensOnLoad&&o.kind==="text"&&this.isRendered(o))&&(s[o.key]=void 0);this.setValues(s)}onTilesKeyDown(e){return r=>{let s=this.choicesOf(e).filter(d=>!d.disabled).map(d=>d.value);if(s.length===0)return;let o=s.indexOf(this.values[e.key]),n;if(r.key==="Home")n=0;else if(r.key==="End")n=s.length-1;else if(r.key==="ArrowRight"||r.key==="ArrowDown")n=o===-1?0:(o+1)%s.length;else if(r.key==="ArrowLeft"||r.key==="ArrowUp")n=o===-1?s.length-1:(o-1+s.length)%s.length;else return;r.preventDefault();let l=s[n];if(l===void 0)return;this.chooseOption(e,l);let c=r.currentTarget,u=this.choicesOf(e).findIndex(d=>d.value===l);requestAnimationFrame(()=>c.querySelector(`[data-tile='${u}']`)?.focus())}}submit(){let e=this.collectMissing();if(e.keys.length>0){this.validationErrors=e.labels,this.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{missing:e.keys},bubbles:!0,composed:!0}));return}this.validationErrors=[],this.clearedIssues=new Set((this.serverIssues??[]).map(n=>n.path));let r={};for(let n of this.fields){let l=this.values[n.key];if(n.name==="seed"&&(l===void 0||l==="")&&(l=zr()),l===void 0||l==="")continue;n.kind==="array"&&typeof l=="string"&&(l=Gr(l));let c=n.group?ge(n.group):null;if(c){let u=r[c.key]??[],d=u[c.index]??{};d[n.name]=l,u[c.index]=d,r[c.key]=u}else if(n.group&&Xt(n)){let u=r[n.group]??{};u[n.name]=l,r[n.group]=u}else r[n.key]=l}let s=this.fields.filter(n=>n.inQuery).map(n=>n.name),o=this.requestLang();this.hasLang&&o&&(r.lang=o,s.push("lang")),this.dispatchEvent(new CustomEvent("roxy-submit",{detail:{endpoint:this.endpoint,values:r,queryKeys:s,sticky:this.soleChoice!=null||this.opensOnLoad},bubbles:!0,composed:!0}))}collectMissing(){let e=[],r=[],s=new Set;for(let o of this.fields){if(!o.required)continue;let n=this.roleOf(o)==="location";if(!this.isRendered(o)&&!n)continue;let l=this.values[o.key];if(!(l!==void 0&&l!=="")){if(e.push(o.key),n){s.add(this.cityGroup(o));continue}r.push(this.fieldLabel(o))}}for(let o of s)r.push(this.locationLabel(o));return{keys:e,labels:r}}reqMark(e){return e.required?h`<span class="req" aria-hidden="true">*</span>`:p}description(e){if(!e.description)return p;if(e.description.length<=120)return h`<small part="hint" class="help">${e.description}</small>`;let r=e.description.split(". ")[0]??e.description;return h`<details part="hint" class="help-details"><summary><span class="help-lead">${r}</span>${Me()}</summary><small class="help help-full">${e.description}</small></details>`}renderTiles(e){let r=`roxy-form-${e.key}-label`,s=!!e.enum&&qt(e.enum),o=this.choicesOf(e),n=xe(o.map(u=>u.value)),l=o.findIndex(u=>u.value===this.values[e.key]),c=l===-1?o.findIndex(u=>!u.disabled):l;return h`<div class="field tiles-field"><span class="label" id="${r}">${this.fieldText(e.name,e.label)}${this.reqMark(e)}</span><div class="${n?"tiles narrow":"tiles"}" role="radiogroup" aria-labelledby="${r}" @keydown="${this.onTilesKeyDown(e)}">${o.map((u,d)=>{let a=this.values[e.key]===u.value,m=s?Rt(u.value):void 0;return h`<button type="button" class="tile" role="radio" data-tile="${d}" aria-checked="${a?"true":"false"}" tabindex="${d===c?"0":"-1"}" ?disabled="${!!u.disabled||this.isDisabled(e)}" @click="${()=>this.chooseOption(e,u.value)}">${m?h`<span class="tile-glyph" aria-hidden="true">${m}</span>`:p} <span class="tile-label">${u.label}</span></button>`})}</div>${this.description(e)} ${this.fieldIssue(e)}</div>`}renderSelect(e){let r=`roxy-form-${e.key}`;return h`<div part="field" class="field"><label for="${r}">${this.fieldText(e.name,e.label)}${this.reqMark(e)}</label> <select id="${r}" ?required="${e.required}" ?disabled="${this.isDisabled(e)}" aria-invalid="${b(this.issueFor(e)?"true":void 0)}" aria-describedby="${b(this.issueFor(e)?`${r}-error`:void 0)}" .value="${xt(this.values[e.key]??"")}" @change="${s=>this.chooseOption(e,s.target.value)}"><option value="">${this.t("Choose")}</option>${this.choicesOf(e).map(s=>h`<option value="${s.value}" ?selected="${this.values[e.key]===s.value}" ?disabled="${!!s.disabled}">${s.label}</option>`)}</select> ${this.description(e)} ${this.fieldIssue(e)}</div>`}renderPickerField(e,r){let s=`roxy-form-${e.key}`,o=this.soleChoice?.key===e.key,n=this.issueFor(e);return h`<div part="field" class="field">${o?p:h`<label for="${s}">${this.fieldText(e.name,e.label)}${this.reqMark(e)}</label>`} ${Yt(r,s,{placeholder:this.t("Type to search"),empty:this.t("{{count}} matches",{count:0}),loading:this.t("Loading")},{labelledby:o?"roxy-form-title":void 0,describedby:n?`${s}-error`:void 0,invalid:!!n})} ${this.fieldIssue(e)}</div>`}renderToggle(e){let r=`roxy-form-${e.key}`,s=this.values[e.key]===!0;return h`<div part="field" class="field"><div class="toggle-row"><button type="button" id="${r}" class="toggle" role="switch" aria-checked="${s?"true":"false"}" @click="${()=>this.setValue(e.key,!s)}"><span class="knob"></span></button> <label class="toggle-label" for="${r}">${this.fieldText(e.name,e.label)}${this.reqMark(e)}</label></div>${this.description(e)} ${this.fieldIssue(e)}</div>`}renderInput(e){let r=`roxy-form-${e.key}`,s=e.kind==="datetime"?"datetime-local":e.kind==="number"?"number":e.kind,o=e.kind==="array"?this.t("Comma separated"):e.example!=null?String(e.example):"";return h`<div part="field" class="field"><label for="${r}">${this.fieldText(e.name,e.label)}${this.reqMark(e)}</label> <input id="${r}" type="${e.kind==="array"?"text":s}" ?required="${e.required}" ?disabled="${this.isDisabled(e)}" aria-invalid="${b(this.issueFor(e)?"true":void 0)}" aria-describedby="${b(this.issueFor(e)?`${r}-error`:void 0)}" min="${b(e.min)}" max="${b(e.max)}" step="${e.kind==="number"?"any":p}" placeholder="${o||p}" .value="${this.values[e.key]??""}" @input="${n=>{let l=this.coerce(e.kind,n.target.value);this.opensOnLoad&&e.kind==="text"?this.setFilter(e,l):this.setValue(e.key,l)}}"> ${this.description(e)} ${this.fieldIssue(e)}</div>`}renderField(e){if(e.city)return this.renderTimezoneCity(e);let r=this.pickers.get(e.key);if(r)return this.renderPickerField(e,r);let s=this.choices[e.key];return s==="loading"?h`<div class="field"><div class="roxy-skeleton" style="height:2.75rem" aria-label="${this.t("Loading")}" role="status"></div></div>`:s||e.kind==="tiles"||e.kind==="select"?this.choiceKind(e)==="tiles"?this.renderTiles(e):this.renderSelect(e):e.kind==="toggle"?this.renderToggle(e):this.renderInput(e)}groupName(e){return ye(e,(r,s)=>this.t(r,s),r=>this.fieldText(r))}repeatCount(e){return new Set(this.fields.map(r=>r.group&&ge(r.group)).filter(r=>r&&r.key===e).map(r=>r.index)).size}addRecord(e){let r=this.repeatCount(e),s=Ft(this.fields,e,r),o=this.groups.find(l=>l.key===w(e,0));if(o){let l=c=>c.replace(`${w(e,0)}.`,`${w(e,r)}.`);this.groups=[...this.groups,{...o,key:w(e,r),label:ye(w(e,r)),...o.location&&{location:{...o.location,fields:o.location.fields.map(l)}}}]}let n={...this.values};for(let l of s)l.default!==void 0&&(n[l.key]=l.default);this.values=n,this.fields=[...this.fields,...s]}removeRecord(e){let r=w(e,this.repeatCount(e)-1);this.fields=this.fields.filter(o=>o.group!==r),this.groups=this.groups.filter(o=>o.key!==r);let s={...this.values};for(let o of Object.keys(s))o.startsWith(`${r}.`)&&delete s[o];this.values=s}repeatControls(e){let r=this.repeatCount(e.key);return e.max<=e.min?p:h`<div class="repeat-controls">${r<e.max?h`<button type="button" class="repeat-btn" @click="${()=>this.addRecord(e.key)}"><span aria-hidden="true">+</span> ${this.t("Add")}</button>`:p} ${r>e.min?h`<button type="button" class="repeat-btn" @click="${()=>this.removeRecord(e.key)}"><span aria-hidden="true">−</span> ${this.t("Remove")}</button>`:p}</div>`}locationLabel(e){return e?this.t("{{group}} location",{group:this.groupName(e)}):Qt(this.placeField(e))?this.t("Birth location"):this.t("Location")}locationBlock(e){return h`<div class="location-block"><label>${this.locationLabel(e)}${this.locationRequired(e)?h`<span class="req" aria-hidden="true">*</span>`:p}</label> ${this.citySearch(e,this.onLocationFor(e))} ${this.issueLines(this.cityIssues(e))}</div>`}renderTimezoneCity(e){return h`<div part="field" class="field location-block"><label>${this.locationLabel(e.group)}${this.reqMark(e)}</label> ${this.citySearch(e.group,r=>this.setValue(e.key,r.timezone))} ${this.fieldIssue(e)}</div>`}citySearch(e,r){let s=e?this.t("{{group}} city",{group:this.groupName(e)}):Qt(this.placeField(e))?this.t("City of birth"):void 0;return h`<roxy-location-search endpoint="${b(this.locationUrl||void 0)}" publishable-key="${b(this.publishableKey)}" lang="${b(this.effectiveLang())}" placeholder="${b(s)}" @roxy-location-select="${o=>r(o.detail)}"></roxy-location-search><small class="help">${this.t("Type a city, then pick it from the list.")}</small>`}groupCard(e){let r=this.fields.filter(s=>s.group===e&&this.isRendered(s));return h`<fieldset part="group" class="person-group"><legend>${this.groupName(e)}</legend>${this.groupHasLocation(e)?this.locationBlock(e):p}<div class="fields">${r.map(s=>this.renderField(s))}</div>${this.issueLines(this.issuesForGroup(e))}</fieldset>`}render(){if(!this.loaded)return h`<form><div class="roxy-skeleton" style="height:8rem"></div></form>`;if(this.specError)return h`<div class="spec-error" role="alert">${this.t("Schema load failed: {{message}}",{message:this.specError})} <button type="button" class="submit" @click="${this.retryLoadSchema}">${this.t("Retry")}</button></div>`;let e=W(this.publishableKey);if(e)return h`<form><h2 part="title" class="title" id="roxy-form-title">${this.formTitle}</h2><div part="validation-error" class="validation-error" role="alert">${this.t(e.message)}</div></form>`;let r=this.fields.filter(d=>!d.group&&this.isRendered(d)),s=this.groupKeys().filter(d=>d!==void 0),o=r.filter(d=>!d.fold),n=r.filter(d=>d.fold),l=s.filter(d=>!this.groups.find(a=>a.key===d)?.fold),c=s.filter(d=>this.groups.find(a=>a.key===d)?.fold),u=n.length>0||c.length>0;return h`<form @submit="${this.onSubmit}"><h2 part="title" class="title" id="roxy-form-title">${this.formTitle}</h2>${this.validationErrors.length>0?h`<div part="validation-error" class="validation-error" role="alert"><strong>${this.t("Please complete:")}</strong> ${this.validationErrors.join(", ")}</div>`:p} ${this.renderIssueSummary()}<div class="fields">${o.map(d=>this.renderField(d))}</div>${this.groupHasLocation(void 0)?this.locationBlock(void 0):p} ${l.map(d=>this.groupCard(d))} ${this.repeats.map(d=>this.repeatControls(d))} ${u?h`<details part="advanced" class="advanced" ?open="${this.liveIssues().some(d=>[...n.map(a=>a.key),...c].some(a=>d.path===a||d.path.startsWith(`${a}.`)))}"><summary>${this.t("Advanced")}${Me()}</summary><div class="fields">${n.map(d=>this.renderField(d))}</div>${c.map(d=>this.groupCard(d))}</details>`:p} ${this.selfSubmits?p:h`<button part="submit" class="submit" type="submit">${this.effectiveSubmitLabel()}</button>`}</form>`}coerce(e,r){if(r!==""){if(e==="number"){let s=Number(r);return Number.isFinite(s)?s:void 0}return r}}};g.styles=[Et,Lt,Wt,A`form{gap:var(--roxy-space-md,1rem);background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);grid-template-columns:minmax(0,1fr);display:grid}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.fields{align-items:start;gap:var(--roxy-space-md,1rem);grid-template-columns:repeat(auto-fit,minmax(12rem,1fr));display:grid}.fields:empty{display:none}.person-group{background:var(--roxy-surface,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-md,1rem);gap:var(--roxy-space-md,1rem);min-inline-size:0;margin:0;display:grid}.person-group legend{padding:0 var(--roxy-space-xs,.25rem);font-weight:var(--roxy-weight-bold,600)}.field{gap:var(--roxy-space-xs,.25rem);flex-direction:column;min-width:0;display:flex}.fields>*,.field>input,.field>select{min-width:0}.tiles-field{grid-column:1/-1}label,.label{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569)}.req{color:var(--_danger-fg);margin-left:4px}input,select{box-sizing:border-box;width:100%;padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-base,1rem);color:var(--roxy-fg,#0a0a0a);background:var(--roxy-bg,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);font-family:inherit}input:focus,select:focus{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px;border-color:var(--roxy-accent-ink,#b45309)}.help{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem)}.field-error{color:var(--_danger-fg);font-size:var(--roxy-text-xs,.75rem)}input[aria-invalid=true],select[aria-invalid=true]{border-color:var(--roxy-danger,#dc2626)}input:disabled,select:disabled{cursor:default;color:var(--roxy-muted,#71717a);border-style:dashed}.help-details>summary{cursor:pointer;color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);align-items:center;gap:4px;display:flex}.help-details .help-lead{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.help-details .help-full{margin-top:var(--roxy-space-xs,.25rem);display:block}.location-block{gap:var(--roxy-space-xs,.25rem);grid-column:1/-1;display:grid}.tiles{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fit,minmax(5.5rem,1fr));display:grid}.tile{min-height:44px;padding:var(--roxy-space-sm,.5rem);background:var(--roxy-bg,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);color:var(--roxy-fg,#0a0a0a);font-family:inherit;font-size:var(--roxy-text-sm,.875rem);cursor:pointer;transition:border-color var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,ease), background-color var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,ease);flex-direction:column;justify-content:center;align-items:center;gap:2px;display:flex}.tile:hover:not(:disabled){border-color:var(--roxy-accent,#f59e0b)}.tile:disabled{cursor:default;color:var(--roxy-muted,#71717a);border-style:dashed}.tiles.narrow{gap:var(--roxy-space-xs,.25rem);grid-template-columns:repeat(auto-fill,minmax(2.25rem,1fr))}.tile[aria-checked=true]{border-color:var(--roxy-accent,#f59e0b);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 12%, transparent);color:var(--roxy-accent-ink,#b45309);font-weight:var(--roxy-weight-bold,600)}.tile:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}.tile-glyph{font-size:1.35em;line-height:1}.toggle-row{align-items:center;gap:var(--roxy-space-sm,.5rem);display:flex}.toggle{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-full,9999px);background:var(--roxy-border,#e4e4e7);cursor:pointer;width:44px;height:26px;transition:background-color var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,ease);flex-shrink:0;padding:0;position:relative}.toggle[aria-checked=true]{background:var(--roxy-accent,#f59e0b);border-color:var(--roxy-accent,#f59e0b)}.toggle .knob{background:var(--roxy-bg,#fff);width:20px;height:20px;transition:transform var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,ease);border-radius:50%;position:absolute;top:2px;left:2px}.toggle[aria-checked=true] .knob{transform:translate(18px)}.toggle:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}.toggle-label{cursor:pointer}@media (prefers-reduced-motion:reduce){.tile,.toggle,.toggle .knob{transition:none}}.advanced{border-top:1px solid var(--roxy-border,#e4e4e7);padding-top:var(--roxy-space-md,1rem)}.advanced>summary{cursor:pointer;font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a);align-items:center;gap:6px;display:flex}.advanced[open]>summary{margin-bottom:var(--roxy-space-md,1rem)}.repeat-controls{gap:var(--roxy-space-sm,.5rem);display:flex}.repeat-btn{color:var(--roxy-accent-ink,#b45309);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);font:inherit;font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);cursor:pointer;background:0 0}.repeat-btn:hover{border-color:var(--roxy-accent-ink,#b45309)}.advanced .fields,.advanced .person-group{margin-top:var(--roxy-space-md,1rem)}.validation-error{gap:var(--roxy-space-xs,.25rem);padding:var(--roxy-space-md,1rem);background:color-mix(in srgb, var(--roxy-danger,#dc2626) 8%, transparent);border:1px solid var(--roxy-danger,#dc2626);border-radius:var(--roxy-radius-md,8px);color:var(--_danger-fg);font-size:var(--roxy-text-sm,.875rem);display:grid}button.submit{background:var(--roxy-accent-ink,#b45309);min-height:44px;color:var(--roxy-bg,#fff);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-lg,1.5rem);font-size:var(--roxy-text-base,1rem);font-weight:var(--roxy-weight-bold,600);cursor:pointer;transition:transform var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1));border:0;justify-self:start}button.submit:hover{transform:scale(1.02)}button.submit:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}@media (prefers-reduced-motion:reduce){button.submit{transition:none}}.spec-error{gap:var(--roxy-space-md,1rem);background:var(--roxy-surface,#fff);border:1px solid var(--roxy-danger,#dc2626);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);color:var(--_danger-fg);font-size:var(--roxy-text-sm,.875rem);justify-items:start;display:grid}`],x([v({type:String,attribute:"data-endpoint"})],g.prototype,"endpoint",2),x([v({type:String})],g.prototype,"method",2),x([v({type:String,attribute:"spec-url"})],g.prototype,"specUrl",2),x([v({type:String,attribute:"submit-label"})],g.prototype,"submitLabel",2),x([v({type:String,attribute:"publishable-key"})],g.prototype,"publishableKey",2),x([v({type:String,attribute:"location-url"})],g.prototype,"locationUrl",2),x([v({attribute:!1})],g.prototype,"initialValues",2),x([v({attribute:!1})],g.prototype,"serverIssues",2),x([v({attribute:!1})],g.prototype,"apiRoute",2),x([v({attribute:!1})],g.prototype,"autoload",2),x([v({attribute:!1})],g.prototype,"fullPages",2),x([S()],g.prototype,"choices",2),x([S()],g.prototype,"clearedIssues",2),x([S()],g.prototype,"fields",2),x([S()],g.prototype,"repeats",2),x([S()],g.prototype,"formTitle",2),x([S()],g.prototype,"hasLang",2),x([S()],g.prototype,"values",2),x([S()],g.prototype,"loaded",2),x([S()],g.prototype,"specError",2),x([S()],g.prototype,"validationErrors",2),g=x([mt("roxy-endpoint-form")],g);Q();return nr(jr);})();
299
+ `;var J="roxy-ui-tokens";function Q(){if(typeof document>"u")return null;let i=document.getElementById(J);if(i)return i;let t=document.createElement("style");return t.id=J,t.textContent=Ze,document.head.prepend(t),t}var X=globalThis,ee=X.ShadowRoot&&(X.ShadyCSS===void 0||X.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,we=Symbol(),Je=new WeakMap,H=class{constructor(t,e,r){if(this._$cssResult$=!0,r!==we)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(ee&&t===void 0){let r=e!==void 0&&e.length===1;r&&(t=Je.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&Je.set(e,t))}return t}toString(){return this.cssText}},Qe=i=>new H(typeof i=="string"?i:i+"",void 0,we),A=(i,...t)=>{let e=i.length===1?i[0]:t.reduce((r,s,o)=>r+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+i[o+1],i[0]);return new H(e,i,we)},Xe=(i,t)=>{if(ee)i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let r=document.createElement("style"),s=X.litNonce;s!==void 0&&r.setAttribute("nonce",s),r.textContent=e.cssText,i.appendChild(r)}},Ae=ee?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(let r of t.cssRules)e+=r.cssText;return Qe(e)})(i):i;var{is:lr,defineProperty:dr,getOwnPropertyDescriptor:cr,getOwnPropertyNames:ur,getOwnPropertySymbols:pr,getPrototypeOf:hr}=Object,te=globalThis,et=te.trustedTypes,mr=et?et.emptyScript:"",fr=te.reactiveElementPolyfillSupport,z=(i,t)=>i,G={toAttribute(i,t){switch(t){case Boolean:i=i?mr:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch{e=null}}return e}},re=(i,t)=>!lr(i,t),tt={attribute:!0,type:String,converter:G,reflect:!1,useDefault:!1,hasChanged:re};Symbol.metadata??=Symbol("metadata"),te.litPropertyMetadata??=new WeakMap;var _=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=tt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let r=Symbol(),s=this.getPropertyDescriptor(t,r,e);s!==void 0&&dr(this.prototype,t,s)}}static getPropertyDescriptor(t,e,r){let{get:s,set:o}=cr(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n}};return{get:s,set(n){let l=s?.call(this);o?.call(this,n),this.requestUpdate(t,l,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??tt}static _$Ei(){if(this.hasOwnProperty(z("elementProperties")))return;let t=hr(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(z("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(z("properties"))){let e=this.properties,r=[...ur(e),...pr(e)];for(let s of r)this.createProperty(s,e[s])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[r,s]of e)this.elementProperties.set(r,s)}this._$Eh=new Map;for(let[e,r]of this.elementProperties){let s=this._$Eu(e,r);s!==void 0&&this._$Eh.set(s,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let r=new Set(t.flat(1/0).reverse());for(let s of r)e.unshift(Ae(s))}else t!==void 0&&e.push(Ae(t));return e}static _$Eu(t,e){let r=e.attribute;return r===!1?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Xe(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$ET(t,e){let r=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,r);if(s!==void 0&&r.reflect===!0){let o=(r.converter?.toAttribute!==void 0?r.converter:G).toAttribute(e,r.type);this._$Em=t,o==null?this.removeAttribute(s):this.setAttribute(s,o),this._$Em=null}}_$AK(t,e){let r=this.constructor,s=r._$Eh.get(t);if(s!==void 0&&this._$Em!==s){let o=r.getPropertyOptions(s),n=typeof o.converter=="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute!==void 0?o.converter:G;this._$Em=s;let l=n.fromAttribute(e,o.type);this[s]=l??this._$Ej?.get(s)??l,this._$Em=null}}requestUpdate(t,e,r,s=!1,o){if(t!==void 0){let n=this.constructor;if(s===!1&&(o=this[t]),r??=n.getPropertyOptions(t),!((r.hasChanged??re)(o,e)||r.useDefault&&r.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(n._$Eu(t,r))))return;this.C(t,e,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:r,reflect:s,wrapped:o},n){r&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??e??this[t]),o!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||r||(e=void 0),this._$AL.set(t,e)),s===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[s,o]of this._$Ep)this[s]=o;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[s,o]of r){let{wrapped:n}=o,l=this[s];n!==!0||this._$AL.has(s)||l===void 0||this.C(s,void 0,o,l)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(e)):this._$EM()}catch(r){throw t=!1,this._$EM(),r}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};_.elementStyles=[],_.shadowRootOptions={mode:"open"},_[z("elementProperties")]=new Map,_[z("finalized")]=new Map,fr?.({ReactiveElement:_}),(te.reactiveElementVersions??=[]).push("2.1.2");var _e=globalThis,rt=i=>i,ie=_e.trustedTypes,it=ie?ie.createPolicy("lit-html",{createHTML:i=>i}):void 0,Re="$lit$",R=`lit$${Math.random().toFixed(9).slice(2)}$`,Oe="?"+R,gr=`<${Oe}>`,P=document,K=()=>P.createComment(""),B=i=>i===null||typeof i!="object"&&typeof i!="function",Ee=Array.isArray,dt=i=>Ee(i)||typeof i?.[Symbol.iterator]=="function",Se=`[
300
+ \f\r]`,j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,st=/-->/g,ot=/>/g,C=RegExp(`>|${Se}(?:([^\\s"'>=/]+)(${Se}*=${Se}*(?:[^
301
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),nt=/'/g,at=/"/g,ct=/^(?:script|style|textarea|title)$/i,Le=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),h=Le(1),ei=Le(2),ti=Le(3),$=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),lt=new WeakMap,D=P.createTreeWalker(P,129);function ut(i,t){if(!Ee(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return it!==void 0?it.createHTML(t):t}var pt=(i,t)=>{let e=i.length-1,r=[],s,o=t===2?"<svg>":t===3?"<math>":"",n=j;for(let l=0;l<e;l++){let c=i[l],u,d,a=-1,m=0;for(;m<c.length&&(n.lastIndex=m,d=n.exec(c),d!==null);)m=n.lastIndex,n===j?d[1]==="!--"?n=st:d[1]!==void 0?n=ot:d[2]!==void 0?(ct.test(d[2])&&(s=RegExp("</"+d[2],"g")),n=C):d[3]!==void 0&&(n=C):n===C?d[0]===">"?(n=s??j,a=-1):d[1]===void 0?a=-2:(a=n.lastIndex-d[2].length,u=d[1],n=d[3]===void 0?C:d[3]==='"'?at:nt):n===at||n===nt?n=C:n===st||n===ot?n=j:(n=C,s=void 0);let f=n===C&&i[l+1].startsWith("/>")?" ":"";o+=n===j?c+gr:a>=0?(r.push(u),c.slice(0,a)+Re+c.slice(a)+R+f):c+R+(a===-2?l:f)}return[ut(i,o+(i[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},V=class i{constructor({strings:t,_$litType$:e},r){let s;this.parts=[];let o=0,n=0,l=t.length-1,c=this.parts,[u,d]=pt(t,e);if(this.el=i.createElement(u,r),D.currentNode=this.el.content,e===2||e===3){let a=this.el.content.firstChild;a.replaceWith(...a.childNodes)}for(;(s=D.nextNode())!==null&&c.length<l;){if(s.nodeType===1){if(s.hasAttributes())for(let a of s.getAttributeNames())if(a.endsWith(Re)){let m=d[n++],f=s.getAttribute(a).split(R),k=/([.?@])?(.*)/.exec(m);c.push({type:1,index:o,name:k[2],strings:f,ctor:k[1]==="."?oe:k[1]==="?"?ne:k[1]==="@"?ae:F}),s.removeAttribute(a)}else a.startsWith(R)&&(c.push({type:6,index:o}),s.removeAttribute(a));if(ct.test(s.tagName)){let a=s.textContent.split(R),m=a.length-1;if(m>0){s.textContent=ie?ie.emptyScript:"";for(let f=0;f<m;f++)s.append(a[f],K()),D.nextNode(),c.push({type:2,index:++o});s.append(a[m],K())}}}else if(s.nodeType===8)if(s.data===Oe)c.push({type:2,index:o});else{let a=-1;for(;(a=s.data.indexOf(R,a+1))!==-1;)c.push({type:7,index:o}),a+=R.length-1}o++}}static createElement(t,e){let r=P.createElement("template");return r.innerHTML=t,r}};function I(i,t,e=i,r){if(t===$)return t;let s=r!==void 0?e._$Co?.[r]:e._$Cl,o=B(t)?void 0:t._$litDirective$;return s?.constructor!==o&&(s?._$AO?.(!1),o===void 0?s=void 0:(s=new o(i),s._$AT(i,e,r)),r!==void 0?(e._$Co??=[])[r]=s:e._$Cl=s),s!==void 0&&(t=I(i,s._$AS(i,t.values),s,r)),t}var se=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:r}=this._$AD,s=(t?.creationScope??P).importNode(e,!0);D.currentNode=s;let o=D.nextNode(),n=0,l=0,c=r[0];for(;c!==void 0;){if(n===c.index){let u;c.type===2?u=new N(o,o.nextSibling,this,t):c.type===1?u=new c.ctor(o,c.name,c.strings,this,t):c.type===6&&(u=new le(o,this,t)),this._$AV.push(u),c=r[++l]}n!==c?.index&&(o=D.nextNode(),n++)}return D.currentNode=P,s}p(t){let e=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}},N=class i{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,s){this.type=2,this._$AH=p,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=I(this,t,e),B(t)?t===p||t==null||t===""?(this._$AH!==p&&this._$AR(),this._$AH=p):t!==this._$AH&&t!==$&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):dt(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!==p&&B(this._$AH)?this._$AA.nextSibling.data=t:this.T(P.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:r}=t,s=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=V.createElement(ut(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===s)this._$AH.p(e);else{let o=new se(s,this),n=o.u(this.options);o.p(e),this.T(n),this._$AH=o}}_$AC(t){let e=lt.get(t.strings);return e===void 0&&lt.set(t.strings,e=new V(t)),e}k(t){Ee(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,r,s=0;for(let o of t)s===e.length?e.push(r=new i(this.O(K()),this.O(K()),this,this.options)):r=e[s],r._$AI(o),s++;s<e.length&&(this._$AR(r&&r._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let r=rt(t).nextSibling;rt(t).remove(),t=r}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},F=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,s,o){this.type=1,this._$AH=p,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=p}_$AI(t,e=this,r,s){let o=this.strings,n=!1;if(o===void 0)t=I(this,t,e,0),n=!B(t)||t!==this._$AH&&t!==$,n&&(this._$AH=t);else{let l=t,c,u;for(t=o[0],c=0;c<o.length-1;c++)u=I(this,l[r+c],e,c),u===$&&(u=this._$AH[c]),n||=!B(u)||u!==this._$AH[c],u===p?t=p:t!==p&&(t+=(u??"")+o[c+1]),this._$AH[c]=u}n&&!s&&this.j(t)}j(t){t===p?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},oe=class extends F{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===p?void 0:t}},ne=class extends F{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==p)}},ae=class extends F{constructor(t,e,r,s,o){super(t,e,r,s,o),this.type=5}_$AI(t,e=this){if((t=I(this,t,e,0)??p)===$)return;let r=this._$AH,s=t===p&&r!==p||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,o=t!==p&&(r===p||s);s&&this.element.removeEventListener(this.name,this,r),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},le=class{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){I(this,t)}},ht={M:Re,P:R,A:Oe,C:1,L:pt,R:se,D:dt,V:I,I:N,H:F,N:ne,U:ae,B:oe,F:le},yr=_e.litHtmlPolyfillSupport;yr?.(V,N),(_e.litHtmlVersions??=[]).push("3.3.3");var mt=(i,t,e)=>{let r=e?.renderBefore??t,s=r._$litPart$;if(s===void 0){let o=e?.renderBefore??null;r._$litPart$=s=new N(t.insertBefore(K(),o),o,void 0,e??{})}return s._$AI(i),s};var Te=globalThis,L=class extends _{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(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return $}};L._$litElement$=!0,L.finalized=!0,Te.litElementHydrateSupport?.({LitElement:L});var xr=Te.litElementPolyfillSupport;xr?.({LitElement:L});(Te.litElementVersions??=[]).push("4.2.2");var ft=i=>(t,e)=>{e!==void 0?e.addInitializer(()=>{customElements.define(i,t)}):customElements.define(i,t)};var br={attribute:!0,type:String,converter:G,reflect:!1,hasChanged:re},vr=(i=br,t,e)=>{let{kind:r,metadata:s}=e,o=globalThis.litPropertyMetadata.get(s);if(o===void 0&&globalThis.litPropertyMetadata.set(s,o=new Map),r==="setter"&&((i=Object.create(i)).wrapped=!0),o.set(e.name,i),r==="accessor"){let{name:n}=e;return{set(l){let c=t.get.call(this);t.set.call(this,l),this.requestUpdate(n,c,i,!0,l)},init(l){return l!==void 0&&this.C(n,void 0,i,l),l}}}if(r==="setter"){let{name:n}=e;return function(l){let c=this[n];t.call(this,l),this.requestUpdate(n,c,i,!0,l)}}throw Error("Unsupported decorator location: "+r)};function v(i){return(t,e)=>typeof e=="object"?vr(i,t,e):((r,s,o)=>{let n=s.hasOwnProperty(o);return s.constructor.createProperty(o,r),n?Object.getOwnPropertyDescriptor(s,o):void 0})(i,t,e)}function S(i){return v({...i,state:!0,attribute:!1})}var b=i=>i??p;var M={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},gt=i=>(...t)=>({_$litDirective$:i,values:t}),ce=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,r){this._$Ct=t,this._$AM=e,this._$Ci=r}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var{I:Vi}=ht;var yt=i=>i.strings===void 0;var kr={},xt=(i,t=kr)=>i._$AH=t;var bt=gt(class extends ce{constructor(i){if(super(i),i.type!==M.PROPERTY&&i.type!==M.ATTRIBUTE&&i.type!==M.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!yt(i))throw Error("`live` bindings can only contain a single expression")}render(i){return i}update(i,[t]){if(t===$||t===p)return t;let e=i.element,r=i.name;if(i.type===M.PROPERTY){if(t===e[r])return $}else if(i.type===M.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(r))return $}else if(i.type===M.ATTRIBUTE&&e.getAttribute(r)===t+"")return $;return xt(i),t}});var Y={afterSunset:"Born after sunset",allowDuplicates:"Allow duplicate cards",allowReversals:"Allow reversed cards",angelDating:"How the name of the day is dated",annualFromYear:"Annual pillars from year",annualYears:"Years of annual pillars",approximateDate:"Approximate date",aspectTypes:"Aspect types",atbashOutput:"AtBash and Albam output",avasthaInfo:"Include avastha details",avoidAnimal:"Avoid clashes with",ayadiText:"Ayadi text family",ayanamsaValue:"Custom ayanamsa value",birthData:"Birth details",birthDate:"Birth date",birthLatitude:"Birth latitude",birthLongitude:"Birth longitude",birthTime:"Birth time",ciphers:"Ciphers to return",context:"Where you saw it",coordinateSystem:"Coordinate system",correlation:"Correlation constant",count:"How many",currentYear:"Year",cuts:"Cut corners",dasha:"Dasha lords",datetime:"Date and time",dayBoundary:"Day boundary",depth:"Depth, north to south",directionScheme:"Direction reading",division:"Divisional chart",domainWeights:"Domain weights",door:"Door coordinates",doorPosition:"Door position along the side",doshaClock:"How the dosha periods are cut",endDate:"End date",endDatetime:"End date and time",expression:"Expression number",extensions:"Extended corners",facing:"Facing direction",facingDegrees:"Facing degrees",family:"Yoga family",firstName:"First name",firstNameHebrew:"First name in Hebrew",fullName:"Full name",gainHouses:"Gain houses",grid:"Mandala grid",hastaInches:"Length of one hasta in inches",horaryNumber:"Horary number",hourClock:"Hour clock",houseSystem:"House system",id:"ID",include:"Additional bodies",includeMatches:"Include equal value matches",interpretation:"Position meaning",intervalMinutes:"Interval in minutes",isLeapMonth:"Leap month",iso2:"Country code",kua:"Kua number",lang:"Language",latinCiphers:"Also score the Latin ciphers",leapDayPolicy:"Where 29 February falls",letter:"Starting letter",letterAttribution:"Letter attribution reading",lifePath:"Life Path number",limit:"Results per page",lines:"Line pattern",lossHouses:"Loss houses",lunarDay:"Lunar day",lunarMonth:"Lunar month",lunarYear:"Lunar year",members:"Group members",minSignificance:"Minimum significance",minStrength:"Minimum strength",misparGadol:"Mispar gadol method",modernPlanets:"Include modern planets",moonWindows:"Moon windows",muhurtaText:"Muhurta text",nameHebrew:"Name in Hebrew",natalChart:"Natal chart",nodeType:"Lunar node type",offset:"Results to skip",polygon:"Outline",positions:"Spread positions",q:"Search",question:"Your question",relocationLatitude:"Relocation latitude",relocationLongitude:"Relocation longitude",returnDate:"Return date",returnYear:"Return year",ritucharyaScheme:"Season division",rituZodiac:"Zodiac the season boundaries are measured in",road:"Road side",rulingPlanets:"Ruling planets",scheme:"Karaka scheme",secondName:"Second name",secondNameHebrew:"Second name in Hebrew",sephirotSystem:"Sephirot reading",sign:"Zodiac sign",sign1:"First animal sign",sign2:"Second animal sign",signDoshaScheme:"Sign humour table",significators:"Include KP significators",slopeLowDirection:"Direction the ground falls toward",slopeSchool:"Ground level school",soulUrge:"Soul Urge number",spreadName:"Spread name",startDate:"Start date",startDatetime:"Start date and time",strictOrbs:"Use tighter orbs",system:"Avastha system",targetDate:"Target date",targetMonth:"Target month",text:"Word or name",textHebrew:"Hebrew word or name",top:"Top events per window",transitDate:"Transit date",transitTime:"Transit time",transliteration:"Transliteration scheme",treeVariant:"Tree arrangement",type:"Pattern type",vyayaFormula:"Vyaya formula",water:"Standing water direction",weights:"Layer weights",width:"Width, east to west",x:"Distance east",y:"Distance north",yearBearerSystem:"Year Bearer school",yearBoundary:"Year boundary",yearStart:"Wheel year start",zodiac:"Zodiac sign"};var vt=["de","en","es","fr","hi","pt","ru","tr","zh-Hans","zh-Hant"];function De(i){if(i.lang)return i.lang;if(typeof document>"u")return;let t=i.closest?.("[lang]")?.getAttribute("lang");return t||document.documentElement.lang||void 0}var $r={tw:"hant",hk:"hant",mo:"hant",cn:"hans",sg:"hans",my:"hans"};function Ce(i){let t=i.toLowerCase();return vt.find(e=>e.toLowerCase()===t)}function kt(i){let t=De(i);if(!t)return;let e=Ce(t);if(e)return e;let r=t.toLowerCase().split("-"),s=r[0];if(s==="zh"){let o=r.find(n=>n==="hans"||n==="hant")??$r[r[1]??""];return o?Ce(`zh-${o}`):void 0}return Ce(s)}function ue(i){return i.toLowerCase().replace(/[\s_-]+/g," ").trim()}function O(i){return i.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([a-z])([0-9])/g,"$1 $2").replace(/^\w/,t=>t.toUpperCase())}var $t="__ROXY_UI_I18N__";function Pe(){let i=globalThis,t=i[$t];if(t)return t;let e={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return i[$t]=e,e}function Ie(i,t){return t?i.replace(/\{\{(\w+)\}\}/g,(e,r)=>r in t?String(t[r]??""):e):i}function wt(i,t,e){return Ie(At(i,t)??t,e)}function At(i,t){if(!i)return;let{catalogs:e}=Pe(),r=i.toLowerCase();return(e[r]??e[r.split("-")[0]])?.[ue(t)]}function St(i){if(!i)return;let{fieldLabels:t}=Pe(),e=i.toLowerCase();return t[e]??t[e.split("-")[0]]}function Fe(i,t){return St(i)?.fields[t]}function _t(i,t,e){return St(i)?.enums[`${t}.${e}`]}function Rt(i){let{listeners:t}=Pe();return t.add(i),()=>{t.delete(i)}}var pe=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){this.unsubscribe=Rt(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var he=class extends L{constructor(){super();this.translator=(e,r)=>this.t(e,r);new pe(this)}t(e,r){return wt(this.effectiveLang(),e,r)}effectiveLang(){return De(this)}};var wr=(i,t)=>t?i[ue(t)]:void 0;var Ar={aries:"♈",taurus:"♉",gemini:"♊",cancer:"♋",leo:"♌",virgo:"♍",libra:"♎",scorpio:"♏",sagittarius:"♐",capricorn:"♑",aquarius:"♒",pisces:"♓"},Ot=i=>wr(Ar,i);var Et=["Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius","Capricorn","Aquarius","Pisces"];var Lt=A`:host{--roxy-label-col:minmax(0, 25%);--_success-fg:var(--roxy-success-fg,#09632a);--_warning-fg:var(--roxy-warning-fg,#913304);--_danger-fg:var(--roxy-danger-fg,#881313);--_info-fg:var(--roxy-info-fg,#014f7a);font-family:var(--roxy-font-sans,system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-base,1rem);line-height:var(--roxy-leading-normal,1.5);animation:roxy-fade-in var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1)) both;background:0 0;display:block;container-type:inline-size}:host([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,var(--roxy-font-sans,system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif))}@keyframes roxy-fade-in{0%{transform:translateY(2px)}to{transform:translateY(0)}}@media (prefers-reduced-motion:reduce){:host{animation:none}}.roxy-skeleton{background:linear-gradient(90deg, var(--roxy-border,#e4e4e7) 0%, color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent) 50%, var(--roxy-border,#e4e4e7) 100%);border-radius:var(--roxy-radius-md,8px);background-size:200% 100%;animation:1.4s ease-in-out infinite roxy-shimmer}@keyframes roxy-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media (prefers-reduced-motion:reduce){.roxy-skeleton{animation:none}}.roxy-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,1.5rem);color:var(--roxy-muted,#71717a);text-align:center;font-size:var(--roxy-text-sm,.875rem)}.roxy-error{gap:var(--roxy-space-sm,.5rem);padding:var(--roxy-space-lg,1.5rem);background:var(--roxy-surface,#fff);border:1px solid var(--roxy-danger,#dc2626);border-radius:var(--roxy-radius-md,8px);color:var(--_danger-fg);font-size:var(--roxy-text-sm,.875rem);justify-items:start;display:grid}:host(:focus-within) .roxy-card{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}.roxy-attribution{margin-top:var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-align:right}.roxy-attribution a{color:inherit;text-decoration:none}.roxy-attribution a:hover{color:var(--roxy-accent-ink,#b45309);text-decoration:underline}.roxy-attribution a:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}.roxy-edit-bar{margin-bottom:var(--roxy-space-sm,.5rem);justify-content:flex-end;display:flex}.roxy-edit{padding:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);color:var(--roxy-fg,#0a0a0a);font-family:inherit;font-size:var(--roxy-text-sm,.875rem);cursor:pointer;background:0 0}.roxy-edit:hover{border-color:var(--roxy-accent,#f59e0b);color:var(--roxy-accent-ink,#b45309)}.roxy-edit:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}.roxy-edit:disabled{cursor:progress;color:var(--roxy-muted,#71717a)}roxy-endpoint-form+*{margin-top:var(--roxy-space-md,1rem)}.roxy-more{justify-items:center;gap:var(--roxy-space-sm,.5rem);margin-top:var(--roxy-space-md,1rem);display:grid}.roxy-more .roxy-edit{min-height:44px}:host{font-variant-emoji:text}`;function Me(){return h`<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 Tt=A`summary{list-style:none}summary::-webkit-details-marker{display:none}.roxy-chevron{aspect-ratio:auto;width:14px;height:14px;color:var(--roxy-muted,#71717a);transition:transform var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,ease);flex-shrink:0}details[open]>summary .roxy-chevron{transform:rotate(180deg)}@media (prefers-reduced-motion:reduce){.roxy-chevron{transition:none}}`;var Sr="pk_live_YOUR_KEY",Ct={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 W(i){if(i)return i===Sr?Ct.sample:i.startsWith("pk_")?void 0:Ct.secret}function qe(i,t,e={}){e.warn&&console.warn(t.message),i.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:t.reason,message:t.message},bubbles:!0,composed:!0}))}var _r="https://roxyapi.com/api/v2";async function Rr(i){try{let t=await i.json();if(t?.error){let e=t.code==="validation_error"&&Array.isArray(t.issues)?t.issues.filter(r=>typeof r.path=="string"&&typeof r.message=="string").map(r=>({path:r.path,message:r.message})):null;return{message:t.error,issues:e?.length?e:null,worded:!0}}}catch{}return{message:`Request failed (${i.status})`,issues:null,worded:!1}}var me=class extends Error{constructor(e,r=null,s=!0){super(e);this.issues=r;this.worded=s}};function Dt(i){return i.submitUrl?void 0:W(i.publishableKey)}function Ue(i){return!!(i.submitUrl||i.publishableKey&&!Dt(i))}async function Ne(i,t,e){let r=Dt(i);if(r)throw new me(r.message);let s=i.submitUrl?await fetch(i.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:Or(t,i.submitContext),signal:e}):await Er(i,t,e);if(!s.ok){let o=await Rr(s);throw new me(o.message,o.issues,o.worded)}return await s.json()}function Or(i,t){return JSON.stringify(t?{...i,context:t}:i)}function Er(i,t,e){let r=new URL(`${i.baseUrl??_r}${t.path}`,document.baseURI);for(let[o,n]of Object.entries(t.query??{}))n!=null&&r.searchParams.set(o,String(n));let s={Accept:"application/json"};return i.publishableKey&&(s["X-API-Key"]=i.publishableKey),t.body!=null&&(s["Content-Type"]="application/json"),fetch(r,{method:t.method??"GET",headers:s,body:t.body!=null?JSON.stringify(t.body):void 0,signal:e})}var Pt={"GET /angel-numbers/numbers/{number}":{number:{path:"/angel-numbers/numbers",limit:50,lang:!0}},"GET /astrology/planet-meanings/{id}":{id:{path:"/astrology/planet-meanings",lang:!0}},"GET /astrology/signs/{id}":{id:{path:"/astrology/signs",lang:!0}},"GET /crystals":{color:{path:"/crystals/colors",lang:!0},planet:{path:"/crystals/planets",lang:!0}},"GET /crystals/{id}":{id:{path:"/crystals",limit:100,lang:!0}},"GET /dreams/symbols":{letter:{path:"/dreams/symbols/letters"}},"GET /dreams/symbols/{id}":{id:{path:"/dreams/symbols",search:"q",limit:50}},"GET /iching/trigrams/{id}":{id:{path:"/iching/trigrams",lang:!0}},"GET /tarot/cards/{id}":{id:{path:"/tarot/cards",limit:100,lang:!0}}},It={"GET /tarot/cards":{suit:{field:"arcana",value:"major"}}};var w=(i,t)=>`${i}.${t}`;function ge(i){let t=/^(.+)\.(\d+)$/.exec(i);return t?{key:t[1],index:Number(t[2])}:null}function ye(i,t=Ie,e=r=>Y[r]??O(r)){let r=ge(i);return r?t("{{group}} {{n}}",{group:e(r.key),n:r.index+1}):t(O(i))}function Mt(i,t,e){let r=w(t,0);return i.filter(s=>s.group===r).map(s=>({...s,key:`${w(t,e)}.${s.name}`,group:w(t,e)}))}function Ge(i){return i.length<=(xe(i)?30:12)?"tiles":"select"}function xe(i){return i.every(t=>t.length<=2)}var Lr=["latitude","longitude","timezone"],Ft=["latitude","longitude"];function Tr(i){let t=i.match(/^(.+?)(Latitude|Longitude)$/);return t?{group:t[1],leaf:t[2].toLowerCase()}:null}var Cr=Et.map(i=>i.toLowerCase());function q(i,t){if(i){if("$ref"in i&&i.$ref){let e=i.$ref.split("/").pop();return e?t[e]:void 0}return i}}function qt(i){let t=i.anyOf??i.oneOf;return!t||t.length===0?i:t.find(e=>Array.isArray(e.enum))??t.find(e=>ze(e)&&ze(e)!=="null")??t[0]??i}function ze(i){if(typeof i.type=="string")return i.type;if(!Array.isArray(i.type))return;let t=i.type.filter(e=>e!=="null");return t.length===1?t[0]:void 0}function Dr(i){let t=qt(i),e=ze(t);return Array.isArray(t.enum)?Ge(t.enum):e==="boolean"?"toggle":t.format==="date"?"date":t.format==="time"?"time":t.format==="date-time"?"datetime":e==="integer"||e==="number"?"number":e==="string"?"text":e==="array"?"array":null}function Ut(i){if(i.length!==12)return!1;let t=new Set(i.map(e=>e.toLowerCase()));return Cr.every(e=>t.has(e))}function fe(i,t,e){let r=qt(t);return{key:e.key,name:i,group:e.group,inQuery:e.inQuery,kind:Dr(t)??"text",required:e.required,description:r.description??t.description,enum:r.enum,min:r.minimum??r.exclusiveMinimum,max:r.maximum??r.exclusiveMaximum,default:t.default??r.default,example:t.example??r.example}}function He(i){return new Set([...i.required??[],...i["x-required-any-of"]?.[0]??[]])}function Nt(i,t,e,r=i.requestBody?"POST":"GET"){let s=[],o=[],n=!1,l=i.requestBody?.content?.["application/json"]?.schema,c=q(l,t),u=c?.["x-required-any-of"];if(c?.properties){let d=He(c);for(let[a,m]of Object.entries(c.properties)){let f=q(m,t)??{},k=f.type==="array"?q(f.items,t):void 0;if(k?.type==="object"&&k.properties){let y=Math.max(1,f.minItems??1),E=He(k);o.push({key:a,min:y,max:f.maxItems??y});for(let U=0;U<y;U++)for(let[T,tr]of Object.entries(k.properties)){let rr=q(tr,t)??{};s.push(fe(T,rr,{key:`${w(a,U)}.${T}`,group:w(a,U),required:d.has(a)&&E.has(T)}))}}else if(f.type==="object"&&f.properties){let y=He(f);for(let[E,U]of Object.entries(f.properties)){let T=q(U,t)??{};T.type==="array"&&q(T.items,t)?.type==="object"||s.push(fe(E,T,{key:`${a}.${E}`,group:a,required:d.has(a)&&y.has(E)}))}}else{let y=Tr(a),E=fe(y?.leaf??a,f,{key:a,group:y?.group,required:d.has(a)});y&&(E.label=`${O(y.group)} ${y.leaf}`),s.push(E)}}}for(let d of i.parameters??[]){if(d.in!=="path"&&d.in!=="query")continue;if(d.name==="lang"&&d.in==="query"){n=!0;continue}let a=q(d.schema,t)??{},m=fe(d.name,a,{key:d.name,required:!!d.required,inQuery:d.in==="query"});if(d.in==="path"&&m.enum&&/^(id|identifier|slug)$/i.test(Y[m.name]??O(m.name))){let f=/^([A-Za-z][A-Za-z -]*?)\s+(?:id|identifier|slug)\b/i.exec(d.description??m.description??"")?.[1]?.trim();f&&(m.label=f)}s.push(m)}return je({title:Pr(i.summary,e),fields:s,hasLang:n,...o.length>0?{repeats:o}:{},...u?{requiredAnyOf:u}:{}},r,e)}function je(i,t,e){let r=`${t.toUpperCase()} /${e.replace(/^\//,"")}`,s=Pt[r]??{},o=It[r]??{},n=i.fields.map(a=>{let m={...a};return delete m.role,delete m.city,delete m.fold,{...m,...s[a.key]&&{source:s[a.key]},...o[a.key]&&{disabledWhen:o[a.key]}}}),l=[...new Set(n.map(a=>a.group))].map(a=>a===void 0?{}:{key:a,label:ye(a)}),c=l.filter(a=>Ft.every(m=>n.some(f=>f.group===a.key&&f.name===m)));for(let[a,m]of c.entries()){let f=n.filter(y=>y.group===m.key),k=f.find(y=>y.name==="timezone")??(a===0?n.find(y=>!y.group&&y.name==="timezone"):void 0);m.location={fields:[...f.filter(y=>Ft.includes(y.name)).map(y=>y.key),...k?[k.key]:[]],required:f.some(y=>Lr.includes(y.name)&&y.required)}}for(let a of n)a.name==="seed"?a.role="seed":(a.name==="limit"||a.name==="offset")&&!a.required?a.role="hidden-default":c.some(m=>m.location?.fields.includes(a.key))?a.role="location":a.name==="timezone"&&(a.city=!0);let u=l.filter(a=>a.key!==void 0&&(a.location||n.some(m=>m.group===a.key&&m.required))),d=n.some(a=>!a.group&&!a.role&&a.required)||u.length>0||c.some(a=>a.key===void 0);for(let a of l)a.key!==void 0&&d&&!u.includes(a)&&(a.fold=!0);for(let a of n)(a.group?l.find(m=>m.key===a.group)?.fold:!a.role&&(d?!a.required:a.default!==void 0))&&(a.fold=!0);return{...i,fields:n,groups:l,opensOnLoad:Ir(i,t)}}function Pr(i,t){let e=i?.split(" - ")[0]?.trim();return e||O(t.split("/").pop()??"")}function Ir(i,t){return t.toUpperCase()==="GET"&&!i.fields.some(e=>e.required)}function Ht(i,t=[]){if(t.some(r=>r.name==="limit"||r.name==="offset"))return"Search";let e=i.toLowerCase();return/compat|synastry|guna|connection|penta|composite/.test(e)?"Compare":/\bcast\b|\/draw|iching|hexagram|tarot/.test(e)?"Cast":/horoscope|dream|angel|nakshatra|crystal|meaning|reference/.test(e)?"Get reading":"Generate"}function zt(i,t){let e=t.replace(/^\//,"").replace(/[{}]/g,"").replace(/\//g,"-");return`${i.toLowerCase()}--${e}.json`}function Fr(i){if(Array.isArray(i))return i;if(!i||typeof i!="object")return null;let t=Object.values(i),e=t.find(Array.isArray);return e||(t.find(s=>!!s&&typeof s=="object"&&Object.values(s).every(o=>typeof o=="number"))??null)}function Ke(i,t="id"){let e=Fr(i);if(!e)return[];if(!Array.isArray(e)){let s=Object.keys(e),o=s.length>0&&s.every(l=>/^[a-z]$/.test(l));return(o?[..."abcdefghijklmnopqrstuvwxyz"]:s).map(l=>({value:l,label:o?l.toUpperCase():l,disabled:!e[l]}))}let r=[];for(let s of e){if(typeof s=="string"){r.push({value:s,label:s});continue}if(!s||typeof s!="object")continue;let o=s,n=o.id??o[t]??o.number;if(n==null)continue;let l=String(n),c=o.name??o.english;r.push({value:l,label:typeof c=="string"?c:l})}return r}function Gt(i){let t=i?.total;return typeof t=="number"?t:void 0}function jt(i,t,e){return Fe(i,t)??e??O(t)}function Kt(i,t,e,r){return _t(i,t,e)??r??O(e)}var Bt=A`.spinner{border:2px solid var(--roxy-muted,#71717a);border-top-color:#0000;border-radius:50%;width:14px;height:14px;animation:.7s linear infinite roxy-spin;position:absolute;top:50%;right:12px;transform:translateY(-50%)}@keyframes roxy-spin{to{transform:translateY(-50%)rotate(360deg)}}@media (prefers-reduced-motion:reduce){.spinner{animation:none}}.results{z-index:50;padding:var(--roxy-space-xs,.25rem);background:var(--roxy-bg,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);box-shadow:var(--roxy-shadow-md);max-height:22rem;animation:roxy-fade-in var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1));margin:0;list-style:none;position:absolute;top:calc(100% + 4px);left:0;right:0;overflow-y:auto}.option{align-items:center;gap:var(--roxy-space-sm,.5rem);width:100%;padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);border-radius:var(--roxy-radius-sm,6px);text-align:left;font-family:inherit;font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-fg,#0a0a0a);cursor:pointer;transition:background-color var(--roxy-motion-duration,.2s);background:0 0;border:0;display:flex}.option:hover,.option[aria-selected=true]{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 10%, transparent)}.empty{padding:var(--roxy-space-md,1rem);color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem)}`;function Vt(i,t){let e,r=((...s)=>{e&&clearTimeout(e),e=setTimeout(()=>{e=void 0,i(...s)},t)});return r.cancel=()=>{e&&(clearTimeout(e),e=void 0)},r}var Mr=10,qr=10,Be=new Map;function Yt(i,t,e={}){return{...i.limit?{limit:i.limit}:{},...i.lang&&t?{lang:t}:{},...e}}function Ye(i,t,e,r){let s=JSON.stringify([i.submitUrl??i.baseUrl,t.path,e,r]),o=Be.get(s);return o||(o=Ur(i,t,e,r).catch(n=>{throw Be.delete(s),n}),Be.set(s,o)),o}async function Ur(i,t,e,r){let s=[];for(let o=0;o<qr;o++){let n=await Ne(i,{path:t.path,method:"GET",query:Yt(t,r,s.length?{offset:s.length}:{})}),l=Ke(n,e);s.push(...l);let c=Gt(n);if(!t.limit||c===void 0||s.length>=c||!l.length)break}return s}var Ve=i=>i.normalize("NFD").replace(new RegExp("\\p{M}","gu"),"").toLowerCase(),be=class{constructor(t,e,r,s,o){this.host=t;this.source=e;this.field=r;this.context=s;this.onPick=o;this.query="";this.options=[];this.open=!1;this.highlight=-1;this.loading=!1;this.error=null;this.search=Vt(t=>{this.searchServer(t)},250);t.addController(this)}hostDisconnected(){this.search.cancel(),this.abort?.abort()}input(t){this.query=t,this.error=null,this.source.search?t.trim().length<2?this.close():this.search(t):this.filter(t),this.host.requestUpdate()}focus(){!this.source.search&&!this.open&&this.filter(this.query)}close(){this.open=!1,this.highlight=-1,this.host.requestUpdate()}pick(t){this.query=t.label,this.close(),this.onPick(t)}keydown(t){let e=this.options.length;if(t.key==="Escape"){this.close();return}if(t.key==="ArrowDown"&&!this.open){t.preventDefault(),this.input(this.query);return}if(!(!this.open||e===0)){if(t.key==="ArrowDown")this.highlight=(this.highlight+1)%e;else if(t.key==="ArrowUp")this.highlight=(this.highlight-1+e)%e;else if(t.key==="Home")this.highlight=0;else if(t.key==="End")this.highlight=e-1;else if(t.key==="Enter"){let r=this.options[this.highlight]??this.options[0];r&&this.pick(r)}else return;t.preventDefault(),this.host.requestUpdate()}}async filter(t){let{route:e,lang:r}=this.context();this.loading=!0,this.host.requestUpdate();try{let s=await Ye(e,this.source,this.field,r);if(t!==this.query)return;let o=Ve(t.trim());this.show(s.filter(n=>Ve(n.label).includes(o)||Ve(n.value).includes(o)))}catch(s){this.fail(s)}finally{this.loading=!1,this.host.requestUpdate()}}async searchServer(t){let{route:e,lang:r}=this.context(),s=this.source.search;this.abort?.abort();let o=new AbortController;this.abort=o,this.loading=!0,this.host.requestUpdate();try{let n=await Ne(e,{path:this.source.path,method:"GET",query:Yt({...this.source,limit:Mr},r,{[s]:t})},o.signal);if(o.signal.aborted)return;this.show(Ke(n,this.field))}catch(n){if(o.signal.aborted)return;this.fail(n)}finally{this.abort===o&&(this.abort=void 0),o.signal.aborted||(this.loading=!1,this.host.requestUpdate())}}show(t){this.options=t,this.open=!0,this.highlight=t.length?0:-1}fail(t){this.options=[],this.open=!1,this.error=t instanceof Error?t.message:String(t)}};function Wt(i,t,e,r={}){let s=`${t}-listbox`;return h`<div class="picker"><input id="${t}" type="text" role="combobox" aria-expanded="${i.open?"true":"false"}" aria-controls="${s}" aria-autocomplete="list" aria-labelledby="${b(r.labelledby)}" aria-describedby="${b(r.describedby)}" aria-invalid="${b(r.invalid?"true":void 0)}" aria-activedescendant="${i.open&&i.highlight>=0?`${t}-opt-${i.highlight}`:""}" autocomplete="off" placeholder="${e.placeholder}" .value="${i.query}" @input="${o=>i.input(o.target.value)}" @keydown="${o=>i.keydown(o)}" @focus="${()=>i.focus()}" @blur="${()=>i.close()}"> ${i.loading?h`<span class="spinner" role="status" aria-label="${e.loading}"></span>`:p} ${i.open?h`<ul id="${s}" class="results" role="listbox">${i.options.length===0?h`<li class="empty" role="status">${e.empty}</li>`:i.options.map((o,n)=>h`<li id="${`${t}-opt-${n}`}" class="option" role="option" aria-selected="${i.highlight===n?"true":"false"}" @mousedown="${l=>l.preventDefault()}" @click="${()=>i.pick(o)}">${o.label}</li>`)}</ul>`:p}</div>${i.error?h`<small class="field-error" role="alert">${i.error}</small>`:p}`}var Zt=[Bt,A`.picker{position:relative}`];var Jt="0.53.1";var Qt="https://roxyapi.com/api/v2/openapi.json",Nr=`https://cdn.jsdelivr.net/npm/@roxyapi/ui@${Jt}/dist/schemas`,ve=new Map,ke=class extends Error{constructor(e){super(`HTTP ${e}`);this.status=e}},$e=class extends Error{constructor(e,r){super(`Endpoint ${e} ${r} not found in OpenAPI spec`);this.method=e;this.path=r}};function Hr(){ve.clear()}async function zr(i){let t=ve.get(i);return t||(t=fetch(i).then(async e=>{if(!e.ok)throw new ke(e.status);return await e.json()}).catch(e=>{throw ve.delete(i),e}),ve.set(i,t)),t}function Gr(){return globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2)}var Xt=i=>/\bbirth/i.test(i?.description??""),er=i=>i.key===`${i.group}.${i.name}`;function jr(i){let t=i.trim();if(!t)return[];try{let e=JSON.parse(t);if(Array.isArray(e))return e}catch{}return t.split(",").map(e=>e.trim()).filter(Boolean)}var g=class extends he{constructor(){super(...arguments);this.endpoint="vedic-astrology/birth-chart";this.method="POST";this.specUrl="";this.submitLabel="";this.serverIssues=null;this.autoload=!1;this.fullPages=!1;this.choices={};this.pickers=new Map;this.clearedIssues=new Set;this.fields=[];this.groups=[];this.modelOpensOnLoad=!1;this.repeats=[];this.formTitle="";this.hasLang=!1;this.values={};this.loaded=!1;this.specError=null;this.validationErrors=[];this.retryLoadSchema=()=>{this.loaded=!1,this.specError=null,this.loadSchema()};this.onSubmit=e=>{e.preventDefault(),this.submit()}}connectedCallback(){super.connectedCallback(),this.loadSchema()}async loadSchema(){this.specError=null;try{this.applyModel(await this.resolveModel())}catch(e){this.specError=this.specErrorMessage(e),this.loaded=!0,this.dispatchEvent(new CustomEvent("roxy-spec-error",{detail:{url:this.specUrl||Qt,message:e instanceof Error?e.message:String(e)},bubbles:!0,composed:!0}))}}specErrorMessage(e){return e instanceof ke?this.t("HTTP error {{status}}",{status:e.status}):e instanceof $e?this.t("Endpoint {{method}} {{path}} not found in OpenAPI spec",{method:e.method,path:e.path}):e instanceof Error?e.message:String(e)}async resolveModel(){return this.specUrl?this.modelFromSpec(this.specUrl):await this.tryLoadSlice()??this.modelFromSpec(Qt)}async modelFromSpec(e){let r=await zr(e),s=`/${this.endpoint.replace(/^\//,"")}`,o=r.paths?.[s]?.[this.method.toLowerCase()];if(!o)throw new $e(this.method,s);return Nt(o,r.components?.schemas??{},this.endpoint,this.method)}async tryLoadSlice(){try{let e=await fetch(`${Nr}/${zt(this.method,this.endpoint)}`);return e.ok?await e.json():null}catch{return null}}applyModel(e){(!e.groups||e.opensOnLoad===void 0)&&(e=je(e,this.method,this.endpoint)),this.fields=e.fields,this.groups=e.groups??[],this.modelOpensOnLoad=e.opensOnLoad??!1,this.repeats=e.repeats??[],this.formTitle=e.title,this.hasLang=e.hasLang;let r={};for(let s of e.fields){let o=this.fullPages&&s.name==="limit"&&this.roleOf(s)==="hidden-default"?s.max??s.default:s.default;o!==void 0&&(r[s.key]=o);let n=s.group&&er(s)?this.initialValues?.[s.group]?.[s.name]:this.initialValues?.[s.key];n!==void 0&&(r[s.key]=n)}this.values=this.withoutDisabled(r),this.loaded=!0,this.loadChoices(),this.autoload&&this.opensOnLoad&&Ue(this.route)&&this.updateComplete.then(()=>this.submit())}get route(){return this.apiRoute??{publishableKey:this.publishableKey}}loadChoices(){for(let r of this.pickers.values())this.removeController(r);if(this.pickers.clear(),!Ue(this.route))return;let e=()=>({route:this.route,lang:this.requestLang()});for(let r of this.fields)if(r.source){if(r.required){let s=new be(this,r.source,r.name,e,o=>this.pickChoice(r,o.value));s.query=String(this.values[r.key]??""),this.pickers.set(r.key,s);continue}this.choices={...this.choices,[r.key]:"loading"},Ye(this.route,r.source,r.name,this.requestLang()).then(s=>{this.choices={...this.choices,[r.key]:s}},()=>{let{[r.key]:s,...o}=this.choices;this.choices=o})}}setValue(e,r){this.setValues({[e]:r})}setValues(e){this.values=this.withoutDisabled({...this.values,...e});let r=Object.keys(e).filter(s=>this.serverIssues?.some(o=>o.path===s));r.length&&(this.clearedIssues=new Set([...this.clearedIssues,...r]))}isDisabled(e,r=this.values){let s=e.disabledWhen;return!!s&&r[s.field]===s.value}withoutDisabled(e){for(let r of this.fields)this.isDisabled(r,e)&&(e[r.key]=void 0);return e}willUpdate(e){e.has("serverIssues")&&(this.clearedIssues=new Set);let r=e.has("publishableKey")?W(this.publishableKey):void 0;r&&qe(this,r,{warn:!0})}liveIssues(){return(this.serverIssues??[]).filter(e=>!this.clearedIssues.has(e.path))}issueFor(e){return this.liveIssues().find(r=>r.path===e.key)}cityIssues(e){return this.liveIssues().filter(r=>{let s=this.fields.find(o=>o.key===r.path);return!!s&&this.roleOf(s)==="location"&&this.cityGroup(s)===e})}issuesForGroup(e){return this.liveIssues().filter(r=>r.path===e)}fieldLabel(e){return this.roleOf(e)==="location"||e.city?this.locationLabel(this.cityGroup(e)):e.group?`${this.groupName(e.group)} ${this.fieldText(e.name,e.label)}`:this.fieldText(e.name,e.label)}issueLines(e){return e.map(r=>h`<small part="field-error" class="field-error" role="alert">${r.message}</small>`)}fieldIssue(e){let r=this.issueFor(e);return r?h`<small part="field-error" class="field-error" id="${`roxy-form-${e.key}-error`}" role="alert">${r.message}</small>`:p}renderIssueSummary(){let e=this.liveIssues();if(e.length===0)return p;let r=s=>{let o=this.fields.find(l=>l.key===s);if(o)return this.fieldLabel(o);let n=this.groupKeys().find(l=>l===s);return n?this.groupName(n):this.fieldText(s.split(".")[0]??s)};return h`<div part="validation-error" class="validation-error" role="alert">${e.map(s=>h`<div><strong>${r(s.path)}</strong> ${s.message}</div>`)}</div>`}roleOf(e){return e.role??"normal"}isRendered(e){return this.roleOf(e)==="normal"}groupKeys(){return this.groups.map(e=>e.key)}groupHasLocation(e){return!!this.groups.find(r=>r.key===e)?.location}cityGroup(e){return this.groups.find(r=>r.location?.fields.includes(e.key))?.key??e.group}placeField(e){let r=this.fields.filter(s=>s.group===e);return r.find(s=>s.name==="latitude")??r.find(s=>s.name==="timezone")}locationRequired(e){return this.groups.find(r=>r.key===e)?.location?.required??!1}get soleChoice(){if(this.groupKeys().some(s=>this.groupHasLocation(s))||this.groupKeys().some(s=>s!==void 0))return null;let e=this.fields.filter(s=>s.required&&this.isRendered(s)),r=e[0];return e.length!==1||!r?null:r.kind==="tiles"||r.kind==="select"||this.pickers.has(r.key)?r:null}get opensOnLoad(){return this.modelOpensOnLoad}isFilter(e){return this.opensOnLoad&&!e.required&&!!(e.enum||e.source)}get selfSubmits(){if(this.soleChoice)return!0;if(!this.opensOnLoad)return!1;let e=this.fields.filter(r=>this.isRendered(r));return e.length>0&&e.every(r=>this.isFilter(r))}choiceKind(e){let r=this.choicesOf(e).map(s=>s.value);return this.isFilter(e)&&!xe(r)?"select":this.choices[e.key]?Ge(r):e.kind}choicesOf(e){let r=this.choices[e.key];return Array.isArray(r)?r:(e.enum??[]).map(s=>({value:s,label:this.optionText(e.name,s)}))}effectiveSubmitLabel(){return this.submitLabel||this.t(Ht(this.endpoint,this.fields))}requestLang(){return kt(this)}fieldText(e,r){return r||jt(this.requestLang(),e,Y[e])}optionText(e,r){return Kt(this.requestLang(),e,r)}onLocationFor(e){return r=>{let s=this.groups.find(n=>n.key===e)?.location?.fields??[],o={};for(let n of s){let l=this.fields.find(c=>c.key===n)?.name;l&&(o[n]=r[l])}this.setValues(o)}}chooseOption(e,r){if(this.isFilter(e)){this.setFilter(e,this.values[e.key]===r?"":r),this.submit();return}this.pickChoice(e,r)}pickChoice(e,r){this.setValue(e.key,r),r&&this.soleChoice?.key===e.key&&this.submit()}setFilter(e,r){let s={[e.key]:r};for(let o of this.fields)o!==e&&(this.isFilter(o)||this.opensOnLoad&&o.kind==="text"&&this.isRendered(o))&&(s[o.key]=void 0);this.setValues(s)}onTilesKeyDown(e){return r=>{let s=this.choicesOf(e).filter(d=>!d.disabled).map(d=>d.value);if(s.length===0)return;let o=s.indexOf(this.values[e.key]),n;if(r.key==="Home")n=0;else if(r.key==="End")n=s.length-1;else if(r.key==="ArrowRight"||r.key==="ArrowDown")n=o===-1?0:(o+1)%s.length;else if(r.key==="ArrowLeft"||r.key==="ArrowUp")n=o===-1?s.length-1:(o-1+s.length)%s.length;else return;r.preventDefault();let l=s[n];if(l===void 0)return;this.chooseOption(e,l);let c=r.currentTarget,u=this.choicesOf(e).findIndex(d=>d.value===l);requestAnimationFrame(()=>c.querySelector(`[data-tile='${u}']`)?.focus())}}submit(){let e=this.collectMissing();if(e.keys.length>0){this.validationErrors=e.labels,this.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{missing:e.keys},bubbles:!0,composed:!0}));return}this.validationErrors=[],this.clearedIssues=new Set((this.serverIssues??[]).map(n=>n.path));let r={};for(let n of this.fields){let l=this.values[n.key];if(n.name==="seed"&&(l===void 0||l==="")&&(l=Gr()),l===void 0||l==="")continue;n.kind==="array"&&typeof l=="string"&&(l=jr(l));let c=n.group?ge(n.group):null;if(c){let u=r[c.key]??[],d=u[c.index]??{};d[n.name]=l,u[c.index]=d,r[c.key]=u}else if(n.group&&er(n)){let u=r[n.group]??{};u[n.name]=l,r[n.group]=u}else r[n.key]=l}let s=this.fields.filter(n=>n.inQuery).map(n=>n.name),o=this.requestLang();this.hasLang&&o&&(r.lang=o,s.push("lang")),this.dispatchEvent(new CustomEvent("roxy-submit",{detail:{endpoint:this.endpoint,values:r,queryKeys:s,sticky:this.soleChoice!=null||this.opensOnLoad},bubbles:!0,composed:!0}))}collectMissing(){let e=[],r=[],s=new Set;for(let o of this.fields){if(!o.required)continue;let n=this.roleOf(o)==="location";if(!this.isRendered(o)&&!n)continue;let l=this.values[o.key];if(!(l!==void 0&&l!=="")){if(e.push(o.key),n){s.add(this.cityGroup(o));continue}r.push(this.fieldLabel(o))}}for(let o of s)r.push(this.locationLabel(o));return{keys:e,labels:r}}reqMark(e){return e.required?h`<span class="req" aria-hidden="true">*</span>`:p}description(e){if(!e.description)return p;if(e.description.length<=120)return h`<small part="hint" class="help">${e.description}</small>`;let r=e.description.split(". ")[0]??e.description;return h`<details part="hint" class="help-details"><summary><span class="help-lead">${r}</span>${Me()}</summary><small class="help help-full">${e.description}</small></details>`}renderTiles(e){let r=`roxy-form-${e.key}-label`,s=!!e.enum&&Ut(e.enum),o=this.choicesOf(e),n=xe(o.map(u=>u.value)),l=o.findIndex(u=>u.value===this.values[e.key]),c=l===-1?o.findIndex(u=>!u.disabled):l;return h`<div class="field tiles-field"><span class="label" id="${r}">${this.fieldText(e.name,e.label)}${this.reqMark(e)}</span><div class="${n?"tiles narrow":"tiles"}" role="radiogroup" aria-labelledby="${r}" @keydown="${this.onTilesKeyDown(e)}">${o.map((u,d)=>{let a=this.values[e.key]===u.value,m=s?Ot(u.value):void 0;return h`<button type="button" class="tile" role="radio" data-tile="${d}" aria-checked="${a?"true":"false"}" tabindex="${d===c?"0":"-1"}" ?disabled="${!!u.disabled||this.isDisabled(e)}" @click="${()=>this.chooseOption(e,u.value)}">${m?h`<span class="tile-glyph" aria-hidden="true">${m}</span>`:p} <span class="tile-label">${u.label}</span></button>`})}</div>${this.description(e)} ${this.fieldIssue(e)}</div>`}renderSelect(e){let r=`roxy-form-${e.key}`;return h`<div part="field" class="field"><label for="${r}">${this.fieldText(e.name,e.label)}${this.reqMark(e)}</label> <select id="${r}" ?required="${e.required}" ?disabled="${this.isDisabled(e)}" aria-invalid="${b(this.issueFor(e)?"true":void 0)}" aria-describedby="${b(this.issueFor(e)?`${r}-error`:void 0)}" .value="${bt(this.values[e.key]??"")}" @change="${s=>this.chooseOption(e,s.target.value)}"><option value="">${this.t("Choose")}</option>${this.choicesOf(e).map(s=>h`<option value="${s.value}" ?selected="${this.values[e.key]===s.value}" ?disabled="${!!s.disabled}">${s.label}</option>`)}</select> ${this.description(e)} ${this.fieldIssue(e)}</div>`}renderPickerField(e,r){let s=`roxy-form-${e.key}`,o=this.soleChoice?.key===e.key,n=this.issueFor(e);return h`<div part="field" class="field">${o?p:h`<label for="${s}">${this.fieldText(e.name,e.label)}${this.reqMark(e)}</label>`} ${Wt(r,s,{placeholder:this.t("Type to search"),empty:this.t("{{count}} matches",{count:0}),loading:this.t("Loading")},{labelledby:o?"roxy-form-title":void 0,describedby:n?`${s}-error`:void 0,invalid:!!n})} ${this.fieldIssue(e)}</div>`}renderToggle(e){let r=`roxy-form-${e.key}`,s=this.values[e.key]===!0;return h`<div part="field" class="field"><div class="toggle-row"><button type="button" id="${r}" class="toggle" role="switch" aria-checked="${s?"true":"false"}" @click="${()=>this.setValue(e.key,!s)}"><span class="knob"></span></button> <label class="toggle-label" for="${r}">${this.fieldText(e.name,e.label)}${this.reqMark(e)}</label></div>${this.description(e)} ${this.fieldIssue(e)}</div>`}renderInput(e){let r=`roxy-form-${e.key}`,s=e.kind==="datetime"?"datetime-local":e.kind==="number"?"number":e.kind,o=e.kind==="array"?this.t("Comma separated"):e.example!=null?String(e.example):"";return h`<div part="field" class="field"><label for="${r}">${this.fieldText(e.name,e.label)}${this.reqMark(e)}</label> <input id="${r}" type="${e.kind==="array"?"text":s}" ?required="${e.required}" ?disabled="${this.isDisabled(e)}" aria-invalid="${b(this.issueFor(e)?"true":void 0)}" aria-describedby="${b(this.issueFor(e)?`${r}-error`:void 0)}" min="${b(e.min)}" max="${b(e.max)}" step="${e.kind==="number"?"any":p}" placeholder="${o||p}" .value="${this.values[e.key]??""}" @input="${n=>{let l=this.coerce(e.kind,n.target.value);this.opensOnLoad&&e.kind==="text"?this.setFilter(e,l):this.setValue(e.key,l)}}"> ${this.description(e)} ${this.fieldIssue(e)}</div>`}renderField(e){if(e.city)return this.renderTimezoneCity(e);let r=this.pickers.get(e.key);if(r)return this.renderPickerField(e,r);let s=this.choices[e.key];return s==="loading"?h`<div class="field"><div class="roxy-skeleton" style="height:2.75rem" aria-label="${this.t("Loading")}" role="status"></div></div>`:s||e.kind==="tiles"||e.kind==="select"?this.choiceKind(e)==="tiles"?this.renderTiles(e):this.renderSelect(e):e.kind==="toggle"?this.renderToggle(e):this.renderInput(e)}groupName(e){return ye(e,(r,s)=>this.t(r,s),r=>this.fieldText(r))}repeatCount(e){return new Set(this.fields.map(r=>r.group&&ge(r.group)).filter(r=>r&&r.key===e).map(r=>r.index)).size}addRecord(e){let r=this.repeatCount(e),s=Mt(this.fields,e,r),o=this.groups.find(l=>l.key===w(e,0));if(o){let l=c=>c.replace(`${w(e,0)}.`,`${w(e,r)}.`);this.groups=[...this.groups,{...o,key:w(e,r),label:ye(w(e,r)),...o.location&&{location:{...o.location,fields:o.location.fields.map(l)}}}]}let n={...this.values};for(let l of s)l.default!==void 0&&(n[l.key]=l.default);this.values=n,this.fields=[...this.fields,...s]}removeRecord(e){let r=w(e,this.repeatCount(e)-1);this.fields=this.fields.filter(o=>o.group!==r),this.groups=this.groups.filter(o=>o.key!==r);let s={...this.values};for(let o of Object.keys(s))o.startsWith(`${r}.`)&&delete s[o];this.values=s}repeatControls(e){let r=this.repeatCount(e.key);return e.max<=e.min?p:h`<div class="repeat-controls">${r<e.max?h`<button type="button" class="repeat-btn" @click="${()=>this.addRecord(e.key)}"><span aria-hidden="true">+</span> ${this.t("Add")}</button>`:p} ${r>e.min?h`<button type="button" class="repeat-btn" @click="${()=>this.removeRecord(e.key)}"><span aria-hidden="true">−</span> ${this.t("Remove")}</button>`:p}</div>`}locationLabel(e){return e?this.t("{{group}} location",{group:this.groupName(e)}):Xt(this.placeField(e))?this.t("Birth location"):this.t("Location")}locationBlock(e){return h`<div class="location-block"><label>${this.locationLabel(e)}${this.locationRequired(e)?h`<span class="req" aria-hidden="true">*</span>`:p}</label> ${this.citySearch(e,this.onLocationFor(e))} ${this.issueLines(this.cityIssues(e))}</div>`}renderTimezoneCity(e){return h`<div part="field" class="field location-block"><label>${this.locationLabel(e.group)}${this.reqMark(e)}</label> ${this.citySearch(e.group,r=>this.setValue(e.key,r.timezone))} ${this.fieldIssue(e)}</div>`}citySearch(e,r){let s=e?this.t("{{group}} city",{group:this.groupName(e)}):Xt(this.placeField(e))?this.t("City of birth"):void 0;return h`<roxy-location-search endpoint="${b(this.locationUrl||void 0)}" publishable-key="${b(this.publishableKey)}" lang="${b(this.effectiveLang())}" placeholder="${b(s)}" @roxy-location-select="${o=>r(o.detail)}"></roxy-location-search><small class="help">${this.t("Type a city, then pick it from the list.")}</small>`}groupCard(e){let r=this.fields.filter(s=>s.group===e&&this.isRendered(s));return h`<fieldset part="group" class="person-group"><legend>${this.groupName(e)}</legend>${this.groupHasLocation(e)?this.locationBlock(e):p}<div class="fields">${r.map(s=>this.renderField(s))}</div>${this.issueLines(this.issuesForGroup(e))}</fieldset>`}render(){if(!this.loaded)return h`<form><div class="roxy-skeleton" style="height:8rem"></div></form>`;if(this.specError)return h`<div class="spec-error" role="alert">${this.t("Schema load failed: {{message}}",{message:this.specError})} <button type="button" class="submit" @click="${this.retryLoadSchema}">${this.t("Retry")}</button></div>`;let e=W(this.publishableKey);if(e)return h`<form><h2 part="title" class="title" id="roxy-form-title">${this.formTitle}</h2><div part="validation-error" class="validation-error" role="alert">${this.t(e.message)}</div></form>`;let r=this.fields.filter(d=>!d.group&&this.isRendered(d)),s=this.groupKeys().filter(d=>d!==void 0),o=r.filter(d=>!d.fold),n=r.filter(d=>d.fold),l=s.filter(d=>!this.groups.find(a=>a.key===d)?.fold),c=s.filter(d=>this.groups.find(a=>a.key===d)?.fold),u=n.length>0||c.length>0;return h`<form @submit="${this.onSubmit}"><h2 part="title" class="title" id="roxy-form-title">${this.formTitle}</h2>${this.validationErrors.length>0?h`<div part="validation-error" class="validation-error" role="alert"><strong>${this.t("Please complete:")}</strong> ${this.validationErrors.join(", ")}</div>`:p} ${this.renderIssueSummary()}<div class="fields">${o.map(d=>this.renderField(d))}</div>${this.groupHasLocation(void 0)?this.locationBlock(void 0):p} ${l.map(d=>this.groupCard(d))} ${this.repeats.map(d=>this.repeatControls(d))} ${u?h`<details part="advanced" class="advanced" ?open="${this.liveIssues().some(d=>[...n.map(a=>a.key),...c].some(a=>d.path===a||d.path.startsWith(`${a}.`)))}"><summary>${this.t("Advanced")}${Me()}</summary><div class="fields">${n.map(d=>this.renderField(d))}</div>${c.map(d=>this.groupCard(d))}</details>`:p} ${this.selfSubmits?p:h`<button part="submit" class="submit" type="submit">${this.effectiveSubmitLabel()}</button>`}</form>`}coerce(e,r){if(r!==""){if(e==="number"){let s=Number(r);return Number.isFinite(s)?s:void 0}return r}}};g.styles=[Lt,Tt,Zt,A`form{gap:var(--roxy-space-md,1rem);background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);box-shadow:var(--roxy-shadow-sm);grid-template-columns:minmax(0,1fr);display:grid}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.fields{align-items:start;gap:var(--roxy-space-md,1rem);grid-template-columns:repeat(auto-fit,minmax(12rem,1fr));display:grid}.fields:empty{display:none}.person-group{background:var(--roxy-surface,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-md,1rem);gap:var(--roxy-space-md,1rem);min-inline-size:0;margin:0;display:grid}.person-group legend{padding:0 var(--roxy-space-xs,.25rem);font-weight:var(--roxy-weight-bold,600)}.field{gap:var(--roxy-space-xs,.25rem);flex-direction:column;min-width:0;display:flex}.fields>*,.field>input,.field>select{min-width:0}.tiles-field{grid-column:1/-1}label,.label{font-size:var(--roxy-text-sm,.875rem);color:var(--roxy-secondary,#475569)}.req{color:var(--_danger-fg);margin-left:4px}input,select{box-sizing:border-box;width:100%;padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-base,1rem);color:var(--roxy-fg,#0a0a0a);background:var(--roxy-bg,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);font-family:inherit}input:focus,select:focus{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px;border-color:var(--roxy-accent-ink,#b45309)}.help{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem)}.field-error{color:var(--_danger-fg);font-size:var(--roxy-text-xs,.75rem)}input[aria-invalid=true],select[aria-invalid=true]{border-color:var(--roxy-danger,#dc2626)}input:disabled,select:disabled{cursor:default;color:var(--roxy-muted,#71717a);border-style:dashed}.help-details>summary{cursor:pointer;color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);align-items:center;gap:4px;display:flex}.help-details .help-lead{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.help-details .help-full{margin-top:var(--roxy-space-xs,.25rem);display:block}.location-block{gap:var(--roxy-space-xs,.25rem);grid-column:1/-1;display:grid}.tiles{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fit,minmax(5.5rem,1fr));display:grid}.tile{min-height:44px;padding:var(--roxy-space-sm,.5rem);background:var(--roxy-bg,#fff);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);color:var(--roxy-fg,#0a0a0a);font-family:inherit;font-size:var(--roxy-text-sm,.875rem);cursor:pointer;transition:border-color var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,ease), background-color var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,ease);flex-direction:column;justify-content:center;align-items:center;gap:2px;display:flex}.tile:hover:not(:disabled){border-color:var(--roxy-accent,#f59e0b)}.tile:disabled{cursor:default;color:var(--roxy-muted,#71717a);border-style:dashed}.tiles.narrow{gap:var(--roxy-space-xs,.25rem);grid-template-columns:repeat(auto-fill,minmax(2.25rem,1fr))}.tile[aria-checked=true]{border-color:var(--roxy-accent,#f59e0b);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 12%, transparent);color:var(--roxy-accent-ink,#b45309);font-weight:var(--roxy-weight-bold,600)}.tile:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}.tile-glyph{font-size:1.35em;line-height:1}.toggle-row{align-items:center;gap:var(--roxy-space-sm,.5rem);display:flex}.toggle{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-full,9999px);background:var(--roxy-border,#e4e4e7);cursor:pointer;width:44px;height:26px;transition:background-color var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,ease);flex-shrink:0;padding:0;position:relative}.toggle[aria-checked=true]{background:var(--roxy-accent,#f59e0b);border-color:var(--roxy-accent,#f59e0b)}.toggle .knob{background:var(--roxy-bg,#fff);width:20px;height:20px;transition:transform var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,ease);border-radius:50%;position:absolute;top:2px;left:2px}.toggle[aria-checked=true] .knob{transform:translate(18px)}.toggle:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}.toggle-label{cursor:pointer}@media (prefers-reduced-motion:reduce){.tile,.toggle,.toggle .knob{transition:none}}.advanced{border-top:1px solid var(--roxy-border,#e4e4e7);padding-top:var(--roxy-space-md,1rem)}.advanced>summary{cursor:pointer;font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-fg,#0a0a0a);align-items:center;gap:6px;display:flex}.advanced[open]>summary{margin-bottom:var(--roxy-space-md,1rem)}.repeat-controls{gap:var(--roxy-space-sm,.5rem);display:flex}.repeat-btn{color:var(--roxy-accent-ink,#b45309);border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);font:inherit;font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);cursor:pointer;background:0 0}.repeat-btn:hover{border-color:var(--roxy-accent-ink,#b45309)}.advanced .fields,.advanced .person-group{margin-top:var(--roxy-space-md,1rem)}.validation-error{gap:var(--roxy-space-xs,.25rem);padding:var(--roxy-space-md,1rem);background:color-mix(in srgb, var(--roxy-danger,#dc2626) 8%, transparent);border:1px solid var(--roxy-danger,#dc2626);border-radius:var(--roxy-radius-md,8px);color:var(--_danger-fg);font-size:var(--roxy-text-sm,.875rem);display:grid}button.submit{background:var(--roxy-accent-ink,#b45309);min-height:44px;color:var(--roxy-bg,#fff);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-lg,1.5rem);font-size:var(--roxy-text-base,1rem);font-weight:var(--roxy-weight-bold,600);cursor:pointer;transition:transform var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1));border:0;justify-self:start}button.submit:hover{transform:scale(1.02)}button.submit:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}@media (prefers-reduced-motion:reduce){button.submit{transition:none}}.spec-error{gap:var(--roxy-space-md,1rem);background:var(--roxy-surface,#fff);border:1px solid var(--roxy-danger,#dc2626);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-lg,1.5rem);color:var(--_danger-fg);font-size:var(--roxy-text-sm,.875rem);justify-items:start;display:grid}`],x([v({type:String,attribute:"data-endpoint"})],g.prototype,"endpoint",2),x([v({type:String})],g.prototype,"method",2),x([v({type:String,attribute:"spec-url"})],g.prototype,"specUrl",2),x([v({type:String,attribute:"submit-label"})],g.prototype,"submitLabel",2),x([v({type:String,attribute:"publishable-key"})],g.prototype,"publishableKey",2),x([v({type:String,attribute:"location-url"})],g.prototype,"locationUrl",2),x([v({attribute:!1})],g.prototype,"initialValues",2),x([v({attribute:!1})],g.prototype,"serverIssues",2),x([v({attribute:!1})],g.prototype,"apiRoute",2),x([v({attribute:!1})],g.prototype,"autoload",2),x([v({attribute:!1})],g.prototype,"fullPages",2),x([S()],g.prototype,"choices",2),x([S()],g.prototype,"clearedIssues",2),x([S()],g.prototype,"fields",2),x([S()],g.prototype,"repeats",2),x([S()],g.prototype,"formTitle",2),x([S()],g.prototype,"hasLang",2),x([S()],g.prototype,"values",2),x([S()],g.prototype,"loaded",2),x([S()],g.prototype,"specError",2),x([S()],g.prototype,"validationErrors",2),g=x([ft("roxy-endpoint-form")],g);Q();return ar(Kr);})();
302
302
  /*! Bundled license information:
303
303
 
304
304
  @lit/reactive-element/css-tag.js: