@roxyapi/ui 0.31.0 → 0.31.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.
- package/components-catalog.json +129 -129
- package/dist/cdn/components/bodygraph.js +13 -13
- package/dist/cdn/components/bodygraph.js.map +3 -3
- package/dist/cdn/components/endpoint-form.js +1 -1
- package/dist/cdn/components/endpoint-form.js.map +1 -1
- package/dist/cdn/components/hd-connection.js +12 -12
- package/dist/cdn/components/hd-connection.js.map +3 -3
- package/dist/cdn/components/hd-penta.js +6 -6
- package/dist/cdn/components/hd-penta.js.map +3 -3
- package/dist/cdn/roxy-ui.js +56 -56
- package/dist/cdn/roxy-ui.js.map +3 -3
- package/dist/components/bodygraph.js +10 -10
- package/dist/components/bodygraph.js.map +3 -3
- package/dist/components/endpoint-form.js +1 -1
- package/dist/components/endpoint-form.js.map +1 -1
- package/dist/components/hd-connection.js +10 -10
- package/dist/components/hd-connection.js.map +3 -3
- package/dist/components/hd-penta.js +9 -9
- package/dist/components/hd-penta.js.map +3 -3
- package/dist/index.cjs +57 -57
- package/dist/index.cjs.map +3 -3
- package/dist/index.js +57 -57
- package/dist/index.js.map +3 -3
- package/dist/utils/bodygraph-render.d.ts +4 -0
- package/dist/utils/bodygraph-render.d.ts.map +1 -1
- package/dist/utils/bodygraph-styles.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/utils/bodygraph-render.ts +70 -2
- package/src/utils/bodygraph-styles.ts +17 -1
- package/src/version.ts +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var RoxyUI_hd_connection=(()=>{var W=Object.defineProperty;var Oe=Object.getOwnPropertyDescriptor;var
|
|
1
|
+
var RoxyUI_hd_connection=(()=>{var W=Object.defineProperty;var Oe=Object.getOwnPropertyDescriptor;var kt=Object.getOwnPropertyNames;var Ct=Object.prototype.hasOwnProperty;var Et=(o,e)=>{for(var t in e)W(o,t,{get:e[t],enumerable:!0})},Rt=(o,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of kt(e))!Ct.call(o,n)&&n!==t&&W(o,n,{get:()=>e[n],enumerable:!(r=Oe(e,n))||r.enumerable});return o};var Tt=o=>Rt(W({},"__esModule",{value:!0}),o),g=(o,e,t,r)=>{for(var n=r>1?void 0:r?Oe(e,t):e,s=o.length-1,i;s>=0;s--)(i=o[s])&&(n=(r?i(e,t,n):i(n))||n);return r&&n&&W(e,t,n),n};var gr={};Et(gr,{ROXY_UI_TOKENS_STYLE_ID:()=>V,RoxyHdConnection:()=>U,injectRoxyTokens:()=>X});var Le=`/**
|
|
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). 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.
|
|
@@ -278,18 +278,18 @@ var RoxyUI_hd_connection=(()=>{var W=Object.defineProperty;var Oe=Object.getOwnP
|
|
|
278
278
|
--roxy-motion-duration: 0ms;
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
|
-
`;var V="roxy-ui-tokens";function X(){if(typeof document>"u")return null;let o=document.getElementById(V);if(o)return o;let e=document.createElement("style");return e.id=V,e.textContent=
|
|
282
|
-
\f\r]`,H=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
283
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),ze=/'/g,Ge=/"/g,Ye=/^(?:script|style|textarea|title)$/i,_e=o=>(e,...t)=>({_$litType$:o,strings:e,values:t}),u=_e(1),$=_e(2),vr=_e(3),T=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Fe=new WeakMap,E=R.createTreeWalker(R,129);function We(o,e){if(!Se(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return De!==void 0?De.createHTML(e):e}var Ht=(o,e)=>{let t=o.length-1,r=[],n,s=e===2?"<svg>":e===3?"<math>":"",i=H;for(let c=0;c<t;c++){let a=o[c],h,p,f=-1,w=0;for(;w<a.length&&(i.lastIndex=w,p=i.exec(a),p!==null);)w=i.lastIndex,i===H?p[1]==="!--"?i=He:p[1]!==void 0?i=je:p[2]!==void 0?(Ye.test(p[2])&&(n=RegExp("</"+p[2],"g")),i=C):p[3]!==void 0&&(i=C):i===C?p[0]===">"?(i=n??H,f=-1):p[1]===void 0?f=-2:(f=i.lastIndex-p[2].length,h=p[1],i=p[3]===void 0?C:p[3]==='"'?Ge:ze):i===Ge||i===ze?i=C:i===He||i===je?i=H:(i=C,n=void 0);let _=i===C&&o[c+1].startsWith("/>")?" ":"";s+=i===H?a+Bt:f>=0?(r.push(h),a.slice(0,f)+Ke+a.slice(f)+A+_):a+A+(f===-2?c:_)}return[We(o,s+(o[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]},G=class o{constructor({strings:e,_$litType$:t},r){let n;this.parts=[];let s=0,i=0,c=e.length-1,a=this.parts,[h,p]=Ht(e,t);if(this.el=o.createElement(h,r),E.currentNode=this.el.content,t===2||t===3){let f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;(n=E.nextNode())!==null&&a.length<c;){if(n.nodeType===1){if(n.hasAttributes())for(let f of n.getAttributeNames())if(f.endsWith(Ke)){let w=p[i++],_=n.getAttribute(f).split(A),Y=/([.?@])?(.*)/.exec(w);a.push({type:1,index:s,name:Y[2],strings:_,ctor:Y[1]==="."?xe:Y[1]==="?"?be:Y[1]==="@"?ve:L}),n.removeAttribute(f)}else f.startsWith(A)&&(a.push({type:6,index:s}),n.removeAttribute(f));if(Ye.test(n.tagName)){let f=n.textContent.split(A),w=f.length-1;if(w>0){n.textContent=te?te.emptyScript:"";for(let _=0;_<w;_++)n.append(f[_],j()),E.nextNode(),a.push({type:2,index:++s});n.append(f[w],j())}}}else if(n.nodeType===8)if(n.data===qe)a.push({type:2,index:s});else{let f=-1;for(;(f=n.data.indexOf(A,f+1))!==-1;)a.push({type:7,index:s}),f+=A.length-1}s++}}static createElement(e,t){let r=R.createElement("template");return r.innerHTML=e,r}};function P(o,e,t=o,r){if(e===T)return e;let n=r!==void 0?t._$Co?.[r]:t._$Cl,s=z(e)?void 0:e._$litDirective$;return n?.constructor!==s&&(n?._$AO?.(!1),s===void 0?n=void 0:(n=new s(o),n._$AT(o,t,r)),r!==void 0?(t._$Co??=[])[r]=n:t._$Cl=n),n!==void 0&&(e=P(o,n._$AS(o,e.values),n,r)),e}var ye=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:r}=this._$AD,n=(e?.creationScope??R).importNode(t,!0);E.currentNode=n;let s=E.nextNode(),i=0,c=0,a=r[0];for(;a!==void 0;){if(i===a.index){let h;a.type===2?h=new F(s,s.nextSibling,this,e):a.type===1?h=new a.ctor(s,a.name,a.strings,this,e):a.type===6&&(h=new $e(s,this,e)),this._$AV.push(h),a=r[++c]}i!==a?.index&&(s=E.nextNode(),i++)}return E.currentNode=R,n}p(e){let t=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}},F=class o{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,r,n){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=P(this,e,t),z(e)?e===d||e==null||e===""?(this._$AH!==d&&this._$AR(),this._$AH=d):e!==this._$AH&&e!==T&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Dt(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==d&&z(this._$AH)?this._$AA.nextSibling.data=e:this.T(R.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:r}=e,n=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=G.createElement(We(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(t);else{let s=new ye(n,this),i=s.u(this.options);s.p(t),this.T(i),this._$AH=s}}_$AC(e){let t=Fe.get(e.strings);return t===void 0&&Fe.set(e.strings,t=new G(e)),t}k(e){Se(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,r,n=0;for(let s of e)n===t.length?t.push(r=new o(this.O(j()),this.O(j()),this,this.options)):r=t[n],r._$AI(s),n++;n<t.length&&(this._$AR(r&&r._$AB.nextSibling,n),t.length=n)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let r=Be(e).nextSibling;Be(e).remove(),e=r}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},L=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,n,s){this.type=1,this._$AH=d,this._$AN=void 0,this.element=e,this.name=t,this._$AM=n,this.options=s,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=d}_$AI(e,t=this,r,n){let s=this.strings,i=!1;if(s===void 0)e=P(this,e,t,0),i=!z(e)||e!==this._$AH&&e!==T,i&&(this._$AH=e);else{let c=e,a,h;for(e=s[0],a=0;a<s.length-1;a++)h=P(this,c[r+a],t,a),h===T&&(h=this._$AH[a]),i||=!z(h)||h!==this._$AH[a],h===d?e=d:e!==d&&(e+=(h??"")+s[a+1]),this._$AH[a]=h}i&&!n&&this.j(e)}j(e){e===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},xe=class extends L{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===d?void 0:e}},be=class extends L{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==d)}},ve=class extends L{constructor(e,t,r,n,s){super(e,t,r,n,s),this.type=5}_$AI(e,t=this){if((e=P(this,e,t,0)??d)===T)return;let r=this._$AH,n=e===d&&r!==d||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,s=e!==d&&(r===d||n);n&&this.element.removeEventListener(this.name,this,r),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},$e=class{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){P(this,e)}};var jt=we.litHtmlPolyfillSupport;jt?.(G,F),(we.litHtmlVersions??=[]).push("3.3.3");var Ve=(o,e,t)=>{let r=t?.renderBefore??e,n=r._$litPart$;if(n===void 0){let s=t?.renderBefore??null;r._$litPart$=n=new F(e.insertBefore(j(),s),s,void 0,t??{})}return n._$AI(o),n};var Ae=globalThis,k=class extends S{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Ve(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return T}};k._$litElement$=!0,k.finalized=!0,Ae.litElementHydrateSupport?.({LitElement:k});var zt=Ae.litElementPolyfillSupport;zt?.({LitElement:k});(Ae.litElementVersions??=[]).push("4.2.2");var Xe=o=>(e,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(o,e)}):customElements.define(o,e)};var Gt={attribute:!0,type:String,converter:D,reflect:!1,hasChanged:ee},Ft=(o=Gt,e,t)=>{let{kind:r,metadata:n}=t,s=globalThis.litPropertyMetadata.get(n);if(s===void 0&&globalThis.litPropertyMetadata.set(n,s=new Map),r==="setter"&&((o=Object.create(o)).wrapped=!0),s.set(t.name,o),r==="accessor"){let{name:i}=t;return{set(c){let a=e.get.call(this);e.set.call(this,c),this.requestUpdate(i,a,o,!0,c)},init(c){return c!==void 0&&this.C(i,void 0,o,c),c}}}if(r==="setter"){let{name:i}=t;return function(c){let a=this[i];e.call(this,c),this.requestUpdate(i,a,o,!0,c)}}throw Error("Unsupported decorator location: "+r)};function x(o){return(e,t)=>typeof t=="object"?Ft(o,e,t):((r,n,s)=>{let i=n.hasOwnProperty(s);return n.constructor.createProperty(s,r),i?Object.getOwnPropertyDescriptor(n,s):void 0})(o,e,t)}function U(o){return x({...o,state:!0,attribute:!1})}var K=o=>o??d;function Je(o){if(o.lang)return o.lang;if(typeof document>"u")return;let e=o.closest?.("[lang]")?.getAttribute("lang");return e||document.documentElement.lang||void 0}function Ze(o){return o.toLowerCase().replace(/[\s_-]+/g," ").trim()}function oe(o){return o.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([a-z])([0-9])/g,"$1 $2").replace(/^\w/,e=>e.toUpperCase())}var Qe="__ROXY_UI_I18N__";function tt(){let o=globalThis,e=o[Qe];if(e)return e;let t={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return o[Qe]=t,t}function et(o,e){return e?o.replace(/\{\{(\w+)\}\}/g,(t,r)=>r in e?String(e[r]??""):t):o}function rt(o,e,t){if(!o)return et(e,t);let{catalogs:r}=tt(),n=o.toLowerCase(),s=r[n]??r[n.split("-")[0]];return et(s?.[Ze(e)]??e,t)}function ot(o){let{listeners:e}=tt();return e.add(o),()=>{e.delete(o)}}var ne=class{constructor(e){this.host=e,e.addController(this)}hostConnected(){this.unsubscribe=ot(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var se=class extends k{constructor(){super();this.translator=(t,r)=>this.t(t,r);new ne(this)}t(t,r){return rt(this.effectiveLang(),t,r)}effectiveLang(){return Je(this)}};var ie=b`:host{font-family:var(--roxy-font-sans,system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-base,1rem);line-height:var(--roxy-leading-normal,1.5);animation:roxy-fade-in var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1)) both;background:0 0;display:block;container-type:inline-size}:host([bare]){--roxy-surface:transparent;--roxy-shadow-sm:none;--roxy-shadow-md:none}*,:before,:after{box-sizing:border-box}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%{opacity:0;transform:translateY(2px)}to{opacity:1;transform:translateY(0)}}@media (prefers-reduced-motion:reduce){:host{animation:none}}.roxy-skeleton{background:linear-gradient(90deg, var(--roxy-border,#e4e4e7) 0%, color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent) 50%, var(--roxy-border,#e4e4e7) 100%);border-radius:var(--roxy-radius-md,8px);background-size:200% 100%;animation:1.4s ease-in-out infinite roxy-shimmer}@keyframes roxy-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media (prefers-reduced-motion:reduce){.roxy-skeleton{animation:none}}.roxy-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(--roxy-danger-fg,#991b1b);font-size:var(--roxy-text-sm,.875rem);justify-items:start;display:grid}.roxy-surface{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a)}:host(:focus-within) .roxy-card{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}.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}:host{font-variant-emoji:text}`;var ae="Client-side components accept a pk_ publishable key only. Use a publishable key with an origin allowlist, or render server-side.";function nt(o){return!!o&&!o.startsWith("pk_")}function st(o,e={}){e.warn&&console.warn(ae),o.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:"possible-secret-key",message:ae},bubbles:!0,composed:!0}))}var Kt="https://roxyapi.com/api/v2";async function qt(o){try{let e=await o.json();if(e?.error)return e.error}catch{}return`Request failed (${o.status})`}var le=class{constructor(e){this.baseUrl=Kt;this.host=e,e.addController(this)}hostDisconnected(){this.abort?.abort(),this.abort=void 0}async run(e){if(!this.submitUrl&&this.secretKeyRefused())return;this.abort?.abort();let t=new AbortController;this.abort=t,this.host.loading=!0,this.host.error=null;try{let r=this.submitUrl?await fetch(this.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(e),signal:t.signal}):await this.callApi(e,t.signal);if(!r.ok)throw new Error(await qt(r));let n=await r.json();if(t.signal.aborted)return;this.host.data=n}catch(r){if(r?.name==="AbortError")return;this.host.error=r instanceof Error?r.message:String(r)}finally{this.abort===t&&(this.abort=void 0),t.signal.aborted||(this.host.loading=!1)}}callApi(e,t){let r=new URL(`${this.baseUrl}${e.path}`);for(let[s,i]of Object.entries(e.query??{}))i!=null&&r.searchParams.set(s,String(i));let n={Accept:"application/json"};return this.publishableKey&&(n["X-API-Key"]=this.publishableKey),e.body!=null&&(n["Content-Type"]="application/json"),fetch(r,{method:e.method??"GET",headers:n,body:e.body!=null?JSON.stringify(e.body):void 0,signal:t})}secretKeyRefused(){return nt(this.publishableKey)?(this.host.error=ae,st(this.host),!0):!1}};function it(o,e,t,r=[]){let n={...t},s=`/${o.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(h,p)=>{let f=n[p];return delete n[p],encodeURIComponent(String(f??""))}),i=new Set(r),c={},a={};for(let[h,p]of Object.entries(n))p===void 0||p===""||(e==="GET"||i.has(h)?c[h]=p:a[h]=p);return{path:s,method:e,query:c,body:e==="POST"?a:void 0}}function at(){return u`<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=b`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 Yt=b`.interp-keywords{flex-wrap:wrap;gap:.25rem;display:flex}.interp-keywords .kw{border-radius:var(--roxy-radius-full,9999px);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-xs,.75rem);padding:1px 8px}`,ct=b`.block{border-top:1px solid var(--roxy-border,#e4e4e7);padding-top:var(--roxy-space-md,1rem)}.block h3{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em}.interp-card{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);margin-bottom:var(--roxy-space-xs,.25rem)}.interp-card summary{cursor:pointer;color:var(--roxy-fg,#0a0a0a);align-items:center;gap:var(--roxy-space-sm,.5rem);font-weight:500;font-size:var(--roxy-text-sm,.875rem);display:flex}.interp-card summary:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px;border-radius:var(--roxy-radius-sm,4px)}.interp-lead{flex-wrap:wrap;flex:auto;order:1;align-items:baseline;gap:.4rem;min-width:0;display:inline-flex}.interp-aside{flex-shrink:0;order:2;align-items:center;gap:.5rem;display:inline-flex}.roxy-chevron{order:3}.interp-aside small{color:var(--roxy-muted,#71717a);white-space:nowrap;font-weight:400}@container (width<=26rem){.interp-card summary{flex-wrap:wrap}.roxy-chevron{order:2}.interp-aside{flex-basis:100%;order:3;justify-content:flex-end}}.interp-body{margin-top:var(--roxy-space-sm,.5rem);gap:var(--roxy-space-sm,.5rem);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);overflow-wrap:anywhere;line-height:1.6;display:grid}.interp-body p{margin:0}${Yt}`;function dt(o,e,t){let r=o.filter(n=>!!n.body);return r.length===0?d:u`<section class="block" part="section readings"><h3>${t}</h3>${r.map((n,s)=>u`<details class="interp-card" part="reading" name="${e}" ?open="${s===0}"><summary><span class="interp-lead">${n.label}</span> ${at()} ${n.aside?u`<span class="interp-aside"><small>${n.aside}</small></span>`:d}</summary><div class="interp-body"><p>${n.body}</p>${n.extra??d}</div></details>`)}</section>`}var Wt="roxy-data";function Vt(o){return o.nodeName==="SCRIPT"&&o.getAttribute("type")==="application/json"}var ce=class{constructor(e){this.host=e,e.addController(this)}hostConnected(){if(this.host.data!=null)return;let e=this.read();e!==void 0&&(this.host.data=e,this.host.requestUpdate())}read(){let e=this.findInlineScript();return e?this.parse(e.textContent):void 0}findInlineScript(){for(let e of Array.from(this.host.children))if(Vt(e)&&e.classList.contains(Wt))return e;return null}parse(e){if(e?.trim())try{return JSON.parse(e)}catch{return}}};var m=class extends se{constructor(){super();this.data=null;this.endpoint="";this.method="POST";this.remember=!1;this.hideReadings=!1;this.hideSections="";this.loading=!1;this.error=null;this.selfFetched=!1;this.editing=!1;this.sticky=!1;this.onEdit=()=>{this.editing=!0};this.onFormSubmit=t=>{let r=t.detail;this.lastValues=r.values,this.sticky=!!r.sticky,this.selfFetched=!0,this.editing=!1,this.remember&&this.writeRemembered(r.values),this.fetcher.run(it(this.endpoint,this.method,r.values,r.queryKeys??[]))};new ce(this),this.fetcher=new le(this)}static{this.styles=[ie]}willUpdate(t){t.has("publishableKey")&&(this.fetcher.publishableKey=this.publishableKey),t.has("baseUrl")&&this.baseUrl&&(this.fetcher.baseUrl=this.baseUrl),t.has("submitUrl")&&(this.fetcher.submitUrl=this.submitUrl)}render(){return u`${this.hiddenSectionsStyle()}${this.renderState()}`}hiddenSectionsStyle(){let t=this.hideSections.split(",").map(n=>n.trim().toLowerCase()).filter(n=>/^[a-z][a-z0-9-]*$/.test(n));if(t.length===0)return d;let r=t.map(n=>`[part~="${n}"]{display:none!important}`).join("");return u`<style>${r}</style>`}renderState(){return this.loading?this.renderLoading():this.error!=null?this.renderError(this.error):this.data!=null?this.selfFetched?this.editing?this.renderForm():this.renderResult(this.data):this.showAttribution()?u`${this.renderData(this.data)}${this.renderAttribution()}`:this.renderData(this.data):this.renderNoData()}renderInterpretation(t,r,n){return this.hideReadings?d:dt(t,r,this.t(n??"Reading"))}renderResult(t){let r=this.sticky?u`${this.renderForm()}${this.renderData(t)}`:u`<div class="roxy-edit-bar" part="edit-bar"><button type="button" class="roxy-edit" @click="${this.onEdit}">${this.t("Edit query")}</button></div>${this.renderData(t)}`;return this.showAttribution()?u`${r}${this.renderAttribution()}`:r}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return u`<div class="roxy-attribution" part="attribution"><a href="https://roxyapi.com/?utm_source=widget&utm_medium=embed" target="_blank" rel="noopener">${this.t("Spiritual data by RoxyAPI")}</a></div>`}renderNoData(){return this.endpoint?this.renderForm():this.renderEmpty()}renderForm(){return u`<roxy-endpoint-form part="form" data-endpoint="${this.endpoint}" method="${this.method}" spec-url="${K(this.specUrl)}" publishable-key="${K(this.publishableKey)}" submit-label="${K(this.submitLabel)}" lang="${K(this.effectiveLang())}" .initialValues="${this.formInitialValues()}" @roxy-submit="${this.onFormSubmit}"></roxy-endpoint-form>`}formInitialValues(){return this.lastValues??(this.remember?this.readRemembered():void 0)}rememberKey(){return`roxy-ui:form:${this.endpoint}`}readRemembered(){try{let t=sessionStorage.getItem(this.rememberKey());return t?JSON.parse(t):void 0}catch{return}}writeRemembered(t){try{sessionStorage.setItem(this.rememberKey(),JSON.stringify(t))}catch{}}renderEmpty(){return u`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return u`<div class="roxy-skeleton" style="height:8rem" role="status" aria-label="${this.t("Loading")}" part="loading"></div>`}renderError(t){let r=u`<div class="roxy-error" role="alert" part="error">${this.t(t)}</div>`;return this.endpoint?u`${r}${this.renderForm()}`:r}};g([x({attribute:!1})],m.prototype,"data",2),g([x({type:String,attribute:"data-endpoint"})],m.prototype,"endpoint",2),g([x({type:String})],m.prototype,"method",2),g([x({type:String,attribute:"publishable-key"})],m.prototype,"publishableKey",2),g([x({type:String,attribute:"base-url"})],m.prototype,"baseUrl",2),g([x({type:String,attribute:"spec-url"})],m.prototype,"specUrl",2),g([x({type:String,attribute:"submit-url"})],m.prototype,"submitUrl",2),g([x({type:Boolean})],m.prototype,"remember",2),g([x({type:Boolean,attribute:"hide-readings",reflect:!0})],m.prototype,"hideReadings",2),g([x({type:String,attribute:"hide-sections",reflect:!0})],m.prototype,"hideSections",2),g([x({type:String,attribute:"submit-label"})],m.prototype,"submitLabel",2),g([x({type:String})],m.prototype,"attribution",2),g([U()],m.prototype,"loading",2),g([U()],m.prototype,"error",2),g([U()],m.prototype,"selfFetched",2),g([U()],m.prototype,"editing",2),g([U()],m.prototype,"sticky",2);var ft=14,Xt=86,mt=0,Jt=102,N=6,gt=(Xt-ft)*N,Zt=(Jt-mt)*N;function pe(o,e){return{x:(o-ft)*N,y:(e-mt)*N}}var l=50,Te=o=>2*l-o,q=1.02*N,yt=1.35*N,y=2.87,v=4.4,ht=5.65,ke={head:{64:[l-y,11.2],61:[l,11.2],63:[l+y,11.2]},ajna:{47:[l-y,18],24:[l,18],4:[l+y,18],17:[l-y,20.6],11:[l+y,20.6],43:[l,25.3]},throat:{62:[l-y,32.4],23:[l,32.4],56:[l+y,32.4],16:[l-v,34.7],35:[l+v,34.7],20:[l-v,37.3],12:[l+v,37.3],45:[l+v,39.6],31:[l-y,41.9],8:[l,41.9],33:[l+y,41.9]},g:{1:[l,47.7],7:[l-y,50.3],13:[l+y,50.3],10:[l-ht,53.4],25:[l+ht,53.4],15:[l-y,56.8],46:[l+y,56.8],2:[l,59.2]},heart:{21:[63.9,59.5],51:[62.1,61.3],26:[60.1,63.3],40:[66.6,63.3]},spleen:{48:[20,70.8],57:[22.5,72.4],44:[25,73.8],50:[27.7,75.3],32:[25,76.6],28:[22.5,78],18:[20,79.5]},sacral:{5:[l-y,72.7],14:[l,72.7],29:[l+y,72.7],34:[l-v,75.4],27:[l-v,79],59:[l+v,79],42:[l-y,81.7],3:[l,81.7],9:[l+y,81.7]},"solar-plexus":{},root:{53:[l-y,90.2],60:[l,90.2],52:[l+y,90.2],54:[l-v,92.6],19:[l+v,92.6],38:[l-v,95.3],39:[l+v,95.3],58:[l-v,98.1],41:[l+v,98.1]}},Qt={48:36,57:22,44:37,50:6,32:49,28:55,18:30};function er(){let o={},e={};for(let[t,[r,n]]of Object.entries(ke.spleen))ke["solar-plexus"][Qt[Number(t)]]=[Te(r),n];for(let[t,r]of Object.entries(ke))for(let[n,[s,i]]of Object.entries(r))o[Number(n)]=pe(s,i),e[Number(n)]=t;return{points:o,centerOf:e}}var{points:Re,centerOf:Fo}=er(),Ko=gt/2;function O(o){return o.map(([e,t])=>pe(e,t))}function Ce(o,e,t){return O([[l-o,e],[l+o,e],[l+o,t],[l-o,t]])}var Ee=5.9,pt=[[18.3,68.3],[18.3,82],[30.3,75.15]],tr=[{id:"head",label:"Head",color:"gold",points:O([[43.55,12.5],[56.45,12.5],[50,1.7]])},{id:"ajna",label:"Ajna",color:"green",points:O([[43.55,16.5],[56.45,16.5],[50,27.7]])},{id:"throat",label:"Throat",color:"brown",points:Ce(Ee,31,43.3)},{id:"g",label:"G",color:"gold",points:O([[50,45.8],[57.7,53.6],[50,61.4],[42.3,53.6]])},{id:"heart",label:"Heart",color:"red",points:O([[56.65,65.23],[64.2,56.74],[69.75,65.23]])},{id:"spleen",label:"Spleen",color:"brown",points:O(pt)},{id:"sacral",label:"Sacral",color:"red",points:Ce(Ee,71.3,83.1)},{id:"solar-plexus",label:"Solar Plexus",color:"brown",points:O(pt.map(([o,e])=>[Te(o),e]))},{id:"root",label:"Root",color:"brown",points:Ce(Ee,88.5,99.8)}],rr=[[64,47],[61,24],[63,4],[17,62],[11,56],[43,23],[16,48],[20,34],[20,10],[7,31],[1,8],[13,33],[21,45],[12,22],[35,36],[57,20],[15,5],[2,14],[46,29],[34,10],[10,57],[25,51],[27,50],[57,34],[26,44],[18,58],[28,38],[32,54],[3,60],[9,52],[42,53],[59,6],[19,49],[39,55],[41,30],[37,40]],or=nr();function nr(){let o=Te,e=[[50,3],[58,3],[60,10],[57,17.5],[56.5,20.5],[53.5,23.5],[51.5,27],[54,28],[64,30],[79,35],[83,42],[84,58],[83,74],[83,86],[76,93],[68,97],[64,99],[62,100.5],[60,100.5]],t=[`M ${de(e[0])}`];for(let r=1;r+2<e.length;r+=3)t.push(`C ${de(e[r])} ${de(e[r+1])} ${de(e[r+2])}`);t.push(`L ${he(e[e.length-1],o)}`);for(let r=e.length-3;r>=1;r-=3)t.push(`C ${he(e[r+1],o)} ${he(e[r],o)} ${he(e[r-1],o)}`);return t.push("Z"),t.join(" ")}function de([o,e]){let t=pe(o,e);return`${t.x} ${t.y}`}function he([o,e],t){let r=pe(t(o),e);return`${r.x} ${r.y}`}function sr(o){return o.map(e=>`${e.x},${e.y}`).join(" ")}function xt(o){return o.left&&o.right?"both":o.left?"src-left":"src-right"}function ir(){return $`<path class="bg-body" d=${or} />`}function ar(o){let e=[];for(let[t,r]of rr){let n=Re[t],s=Re[r];if(!n||!s)continue;e.push($`<line class="bg-channel" x1=${n.x} y1=${n.y} x2=${s.x} y2=${s.y} />`);let i={x:(n.x+s.x)/2,y:(n.y+s.y)/2};for(let[c,a]of[[t,n],[r,s]]){let h=o.get(c);if(!h)continue;let p=xt(h);e.push($`<line class="bg-half ${p==="both"?"src-left":p}" x1=${a.x} y1=${a.y} x2=${i.x} y2=${i.y} />`),p==="both"&&e.push($`<line class="bg-half src-right stripe" x1=${a.x} y1=${a.y} x2=${i.x} y2=${i.y} />`)}}return e}function lr(o,e,t){return tr.map(r=>{let n=o.has(r.id),s=`bg-center bg-${r.color}${n?" defined":""}`,i=e?.get(r.id)||r.label;return $`<polygon class=${s} points=${sr(r.points)}><title>${i}: ${n?t.defined:t.open}</title></polygon>`})}function ut(o,e){return`M ${o.x} ${o.y-q} A ${q} ${q} 0 0 ${e} ${o.x} ${o.y+q} Z`}function cr(o,e){let t=[];for(let[r,n]of Object.entries(Re)){let s=Number(r),i=o.get(s),c=i?xt(i):"",a=e.get(s);t.push($`<g class="bg-gate-node">
|
|
284
|
-
${c==="both"?[
|
|
281
|
+
`;var V="roxy-ui-tokens";function X(){if(typeof document>"u")return null;let o=document.getElementById(V);if(o)return o;let e=document.createElement("style");return e.id=V,e.textContent=Le,document.head.prepend(e),e}var J=globalThis,Z=J.ShadowRoot&&(J.ShadyCSS===void 0||J.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,fe=Symbol(),Me=new WeakMap,I=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==fe)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(Z&&e===void 0){let r=t!==void 0&&t.length===1;r&&(e=Me.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&Me.set(t,e))}return e}toString(){return this.cssText}},Ne=o=>new I(typeof o=="string"?o:o+"",void 0,fe),b=(o,...e)=>{let t=o.length===1?o[0]:e.reduce((r,n,s)=>r+(i=>{if(i._$cssResult$===!0)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+o[s+1],o[0]);return new I(t,o,fe)},Ue=(o,e)=>{if(Z)o.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of e){let r=document.createElement("style"),n=J.litNonce;n!==void 0&&r.setAttribute("nonce",n),r.textContent=t.cssText,o.appendChild(r)}},me=Z?o=>o:o=>o instanceof CSSStyleSheet?(e=>{let t="";for(let r of e.cssRules)t+=r.cssText;return Ne(t)})(o):o;var{is:Pt,defineProperty:Ot,getOwnPropertyDescriptor:Lt,getOwnPropertyNames:Mt,getOwnPropertySymbols:Nt,getPrototypeOf:Ut}=Object,Q=globalThis,Ie=Q.trustedTypes,It=Ie?Ie.emptyScript:"",Bt=Q.reactiveElementPolyfillSupport,B=(o,e)=>o,D={toAttribute(o,e){switch(e){case Boolean:o=o?It:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,e){let t=o;switch(e){case Boolean:t=o!==null;break;case Number:t=o===null?null:Number(o);break;case Object:case Array:try{t=JSON.parse(o)}catch{t=null}}return t}},ee=(o,e)=>!Pt(o,e),Be={attribute:!0,type:String,converter:D,reflect:!1,useDefault:!1,hasChanged:ee};Symbol.metadata??=Symbol("metadata"),Q.litPropertyMetadata??=new WeakMap;var S=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Be){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let r=Symbol(),n=this.getPropertyDescriptor(e,r,t);n!==void 0&&Ot(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){let{get:n,set:s}=Lt(this.prototype,e)??{get(){return this[t]},set(i){this[t]=i}};return{get:n,set(i){let c=n?.call(this);s?.call(this,i),this.requestUpdate(e,c,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Be}static _$Ei(){if(this.hasOwnProperty(B("elementProperties")))return;let e=Ut(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(B("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(B("properties"))){let t=this.properties,r=[...Mt(t),...Nt(t)];for(let n of r)this.createProperty(n,t[n])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[r,n]of t)this.elementProperties.set(r,n)}this._$Eh=new Map;for(let[t,r]of this.elementProperties){let n=this._$Eu(t,r);n!==void 0&&this._$Eh.set(n,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let r=new Set(e.flat(1/0).reverse());for(let n of r)t.unshift(me(n))}else e!==void 0&&t.push(me(e));return t}static _$Eu(e,t){let r=t.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.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(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ue(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$ET(e,t){let r=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,r);if(n!==void 0&&r.reflect===!0){let s=(r.converter?.toAttribute!==void 0?r.converter:D).toAttribute(t,r.type);this._$Em=e,s==null?this.removeAttribute(n):this.setAttribute(n,s),this._$Em=null}}_$AK(e,t){let r=this.constructor,n=r._$Eh.get(e);if(n!==void 0&&this._$Em!==n){let s=r.getPropertyOptions(n),i=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:D;this._$Em=n;let c=i.fromAttribute(t,s.type);this[n]=c??this._$Ej?.get(n)??c,this._$Em=null}}requestUpdate(e,t,r,n=!1,s){if(e!==void 0){let i=this.constructor;if(n===!1&&(s=this[e]),r??=i.getPropertyOptions(e),!((r.hasChanged??ee)(s,t)||r.useDefault&&r.reflect&&s===this._$Ej?.get(e)&&!this.hasAttribute(i._$Eu(e,r))))return;this.C(e,t,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:r,reflect:n,wrapped:s},i){r&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,i??t??this[e]),s!==!0||i!==void 0)||(this._$AL.has(e)||(this.hasUpdated||r||(t=void 0),this._$AL.set(e,t)),n===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[n,s]of this._$Ep)this[n]=s;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[n,s]of r){let{wrapped:i}=s,c=this[n];i!==!0||this._$AL.has(n)||c===void 0||this.C(n,void 0,s,c)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(t)):this._$EM()}catch(r){throw e=!1,this._$EM(),r}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(e){}firstUpdated(e){}};S.elementStyles=[],S.shadowRootOptions={mode:"open"},S[B("elementProperties")]=new Map,S[B("finalized")]=new Map,Bt?.({ReactiveElement:S}),(Q.reactiveElementVersions??=[]).push("2.1.2");var we=globalThis,De=o=>o,te=we.trustedTypes,He=te?te.createPolicy("lit-html",{createHTML:o=>o}):void 0,qe="$lit$",A=`lit$${Math.random().toFixed(9).slice(2)}$`,Ye="?"+A,Dt=`<${Ye}>`,R=document,j=()=>R.createComment(""),z=o=>o===null||typeof o!="object"&&typeof o!="function",Se=Array.isArray,Ht=o=>Se(o)||typeof o?.[Symbol.iterator]=="function",ge=`[
|
|
282
|
+
\f\r]`,H=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,je=/-->/g,ze=/>/g,C=RegExp(`>|${ge}(?:([^\\s"'>=/]+)(${ge}*=${ge}*(?:[^
|
|
283
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ge=/'/g,Fe=/"/g,We=/^(?:script|style|textarea|title)$/i,_e=o=>(e,...t)=>({_$litType$:o,strings:e,values:t}),u=_e(1),v=_e(2),Ar=_e(3),T=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Ke=new WeakMap,E=R.createTreeWalker(R,129);function Ve(o,e){if(!Se(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return He!==void 0?He.createHTML(e):e}var jt=(o,e)=>{let t=o.length-1,r=[],n,s=e===2?"<svg>":e===3?"<math>":"",i=H;for(let c=0;c<t;c++){let a=o[c],p,h,f=-1,w=0;for(;w<a.length&&(i.lastIndex=w,h=i.exec(a),h!==null);)w=i.lastIndex,i===H?h[1]==="!--"?i=je:h[1]!==void 0?i=ze:h[2]!==void 0?(We.test(h[2])&&(n=RegExp("</"+h[2],"g")),i=C):h[3]!==void 0&&(i=C):i===C?h[0]===">"?(i=n??H,f=-1):h[1]===void 0?f=-2:(f=i.lastIndex-h[2].length,p=h[1],i=h[3]===void 0?C:h[3]==='"'?Fe:Ge):i===Fe||i===Ge?i=C:i===je||i===ze?i=H:(i=C,n=void 0);let _=i===C&&o[c+1].startsWith("/>")?" ":"";s+=i===H?a+Dt:f>=0?(r.push(p),a.slice(0,f)+qe+a.slice(f)+A+_):a+A+(f===-2?c:_)}return[Ve(o,s+(o[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]},G=class o{constructor({strings:e,_$litType$:t},r){let n;this.parts=[];let s=0,i=0,c=e.length-1,a=this.parts,[p,h]=jt(e,t);if(this.el=o.createElement(p,r),E.currentNode=this.el.content,t===2||t===3){let f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;(n=E.nextNode())!==null&&a.length<c;){if(n.nodeType===1){if(n.hasAttributes())for(let f of n.getAttributeNames())if(f.endsWith(qe)){let w=h[i++],_=n.getAttribute(f).split(A),Y=/([.?@])?(.*)/.exec(w);a.push({type:1,index:s,name:Y[2],strings:_,ctor:Y[1]==="."?xe:Y[1]==="?"?be:Y[1]==="@"?ve:M}),n.removeAttribute(f)}else f.startsWith(A)&&(a.push({type:6,index:s}),n.removeAttribute(f));if(We.test(n.tagName)){let f=n.textContent.split(A),w=f.length-1;if(w>0){n.textContent=te?te.emptyScript:"";for(let _=0;_<w;_++)n.append(f[_],j()),E.nextNode(),a.push({type:2,index:++s});n.append(f[w],j())}}}else if(n.nodeType===8)if(n.data===Ye)a.push({type:2,index:s});else{let f=-1;for(;(f=n.data.indexOf(A,f+1))!==-1;)a.push({type:7,index:s}),f+=A.length-1}s++}}static createElement(e,t){let r=R.createElement("template");return r.innerHTML=e,r}};function L(o,e,t=o,r){if(e===T)return e;let n=r!==void 0?t._$Co?.[r]:t._$Cl,s=z(e)?void 0:e._$litDirective$;return n?.constructor!==s&&(n?._$AO?.(!1),s===void 0?n=void 0:(n=new s(o),n._$AT(o,t,r)),r!==void 0?(t._$Co??=[])[r]=n:t._$Cl=n),n!==void 0&&(e=L(o,n._$AS(o,e.values),n,r)),e}var ye=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:r}=this._$AD,n=(e?.creationScope??R).importNode(t,!0);E.currentNode=n;let s=E.nextNode(),i=0,c=0,a=r[0];for(;a!==void 0;){if(i===a.index){let p;a.type===2?p=new F(s,s.nextSibling,this,e):a.type===1?p=new a.ctor(s,a.name,a.strings,this,e):a.type===6&&(p=new $e(s,this,e)),this._$AV.push(p),a=r[++c]}i!==a?.index&&(s=E.nextNode(),i++)}return E.currentNode=R,n}p(e){let t=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}},F=class o{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,r,n){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=L(this,e,t),z(e)?e===d||e==null||e===""?(this._$AH!==d&&this._$AR(),this._$AH=d):e!==this._$AH&&e!==T&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Ht(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==d&&z(this._$AH)?this._$AA.nextSibling.data=e:this.T(R.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:r}=e,n=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=G.createElement(Ve(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(t);else{let s=new ye(n,this),i=s.u(this.options);s.p(t),this.T(i),this._$AH=s}}_$AC(e){let t=Ke.get(e.strings);return t===void 0&&Ke.set(e.strings,t=new G(e)),t}k(e){Se(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,r,n=0;for(let s of e)n===t.length?t.push(r=new o(this.O(j()),this.O(j()),this,this.options)):r=t[n],r._$AI(s),n++;n<t.length&&(this._$AR(r&&r._$AB.nextSibling,n),t.length=n)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let r=De(e).nextSibling;De(e).remove(),e=r}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},M=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,n,s){this.type=1,this._$AH=d,this._$AN=void 0,this.element=e,this.name=t,this._$AM=n,this.options=s,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=d}_$AI(e,t=this,r,n){let s=this.strings,i=!1;if(s===void 0)e=L(this,e,t,0),i=!z(e)||e!==this._$AH&&e!==T,i&&(this._$AH=e);else{let c=e,a,p;for(e=s[0],a=0;a<s.length-1;a++)p=L(this,c[r+a],t,a),p===T&&(p=this._$AH[a]),i||=!z(p)||p!==this._$AH[a],p===d?e=d:e!==d&&(e+=(p??"")+s[a+1]),this._$AH[a]=p}i&&!n&&this.j(e)}j(e){e===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},xe=class extends M{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===d?void 0:e}},be=class extends M{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==d)}},ve=class extends M{constructor(e,t,r,n,s){super(e,t,r,n,s),this.type=5}_$AI(e,t=this){if((e=L(this,e,t,0)??d)===T)return;let r=this._$AH,n=e===d&&r!==d||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,s=e!==d&&(r===d||n);n&&this.element.removeEventListener(this.name,this,r),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},$e=class{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){L(this,e)}};var zt=we.litHtmlPolyfillSupport;zt?.(G,F),(we.litHtmlVersions??=[]).push("3.3.3");var Xe=(o,e,t)=>{let r=t?.renderBefore??e,n=r._$litPart$;if(n===void 0){let s=t?.renderBefore??null;r._$litPart$=n=new F(e.insertBefore(j(),s),s,void 0,t??{})}return n._$AI(o),n};var Ae=globalThis,k=class extends S{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Xe(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return T}};k._$litElement$=!0,k.finalized=!0,Ae.litElementHydrateSupport?.({LitElement:k});var Gt=Ae.litElementPolyfillSupport;Gt?.({LitElement:k});(Ae.litElementVersions??=[]).push("4.2.2");var Je=o=>(e,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(o,e)}):customElements.define(o,e)};var Ft={attribute:!0,type:String,converter:D,reflect:!1,hasChanged:ee},Kt=(o=Ft,e,t)=>{let{kind:r,metadata:n}=t,s=globalThis.litPropertyMetadata.get(n);if(s===void 0&&globalThis.litPropertyMetadata.set(n,s=new Map),r==="setter"&&((o=Object.create(o)).wrapped=!0),s.set(t.name,o),r==="accessor"){let{name:i}=t;return{set(c){let a=e.get.call(this);e.set.call(this,c),this.requestUpdate(i,a,o,!0,c)},init(c){return c!==void 0&&this.C(i,void 0,o,c),c}}}if(r==="setter"){let{name:i}=t;return function(c){let a=this[i];e.call(this,c),this.requestUpdate(i,a,o,!0,c)}}throw Error("Unsupported decorator location: "+r)};function x(o){return(e,t)=>typeof t=="object"?Kt(o,e,t):((r,n,s)=>{let i=n.hasOwnProperty(s);return n.constructor.createProperty(s,r),i?Object.getOwnPropertyDescriptor(n,s):void 0})(o,e,t)}function N(o){return x({...o,state:!0,attribute:!1})}var K=o=>o??d;function Ze(o){if(o.lang)return o.lang;if(typeof document>"u")return;let e=o.closest?.("[lang]")?.getAttribute("lang");return e||document.documentElement.lang||void 0}function Qe(o){return o.toLowerCase().replace(/[\s_-]+/g," ").trim()}function oe(o){return o.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([a-z])([0-9])/g,"$1 $2").replace(/^\w/,e=>e.toUpperCase())}var et="__ROXY_UI_I18N__";function rt(){let o=globalThis,e=o[et];if(e)return e;let t={catalogs:{},fieldLabels:{},requested:new Set,listeners:new Set};return o[et]=t,t}function tt(o,e){return e?o.replace(/\{\{(\w+)\}\}/g,(t,r)=>r in e?String(e[r]??""):t):o}function ot(o,e,t){if(!o)return tt(e,t);let{catalogs:r}=rt(),n=o.toLowerCase(),s=r[n]??r[n.split("-")[0]];return tt(s?.[Qe(e)]??e,t)}function nt(o){let{listeners:e}=rt();return e.add(o),()=>{e.delete(o)}}var ne=class{constructor(e){this.host=e,e.addController(this)}hostConnected(){this.unsubscribe=nt(()=>this.host.requestUpdate())}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}};var se=class extends k{constructor(){super();this.translator=(t,r)=>this.t(t,r);new ne(this)}t(t,r){return ot(this.effectiveLang(),t,r)}effectiveLang(){return Ze(this)}};var ie=b`:host{font-family:var(--roxy-font-sans,system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-base,1rem);line-height:var(--roxy-leading-normal,1.5);animation:roxy-fade-in var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1)) both;background:0 0;display:block;container-type:inline-size}:host([bare]){--roxy-surface:transparent;--roxy-shadow-sm:none;--roxy-shadow-md:none}*,:before,:after{box-sizing:border-box}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%{opacity:0;transform:translateY(2px)}to{opacity:1;transform:translateY(0)}}@media (prefers-reduced-motion:reduce){:host{animation:none}}.roxy-skeleton{background:linear-gradient(90deg, var(--roxy-border,#e4e4e7) 0%, color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent) 50%, var(--roxy-border,#e4e4e7) 100%);border-radius:var(--roxy-radius-md,8px);background-size:200% 100%;animation:1.4s ease-in-out infinite roxy-shimmer}@keyframes roxy-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media (prefers-reduced-motion:reduce){.roxy-skeleton{animation:none}}.roxy-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(--roxy-danger-fg,#991b1b);font-size:var(--roxy-text-sm,.875rem);justify-items:start;display:grid}.roxy-surface{background:var(--roxy-surface,#fff);color:var(--roxy-fg,#0a0a0a)}:host(:focus-within) .roxy-card{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}.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}:host{font-variant-emoji:text}`;var ae="Client-side components accept a pk_ publishable key only. Use a publishable key with an origin allowlist, or render server-side.";function st(o){return!!o&&!o.startsWith("pk_")}function it(o,e={}){e.warn&&console.warn(ae),o.dispatchEvent(new CustomEvent("roxy-validation-error",{detail:{reason:"possible-secret-key",message:ae},bubbles:!0,composed:!0}))}var qt="https://roxyapi.com/api/v2";async function Yt(o){try{let e=await o.json();if(e?.error)return e.error}catch{}return`Request failed (${o.status})`}var le=class{constructor(e){this.baseUrl=qt;this.host=e,e.addController(this)}hostDisconnected(){this.abort?.abort(),this.abort=void 0}async run(e){if(!this.submitUrl&&this.secretKeyRefused())return;this.abort?.abort();let t=new AbortController;this.abort=t,this.host.loading=!0,this.host.error=null;try{let r=this.submitUrl?await fetch(this.submitUrl,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(e),signal:t.signal}):await this.callApi(e,t.signal);if(!r.ok)throw new Error(await Yt(r));let n=await r.json();if(t.signal.aborted)return;this.host.data=n}catch(r){if(r?.name==="AbortError")return;this.host.error=r instanceof Error?r.message:String(r)}finally{this.abort===t&&(this.abort=void 0),t.signal.aborted||(this.host.loading=!1)}}callApi(e,t){let r=new URL(`${this.baseUrl}${e.path}`);for(let[s,i]of Object.entries(e.query??{}))i!=null&&r.searchParams.set(s,String(i));let n={Accept:"application/json"};return this.publishableKey&&(n["X-API-Key"]=this.publishableKey),e.body!=null&&(n["Content-Type"]="application/json"),fetch(r,{method:e.method??"GET",headers:n,body:e.body!=null?JSON.stringify(e.body):void 0,signal:t})}secretKeyRefused(){return st(this.publishableKey)?(this.host.error=ae,it(this.host),!0):!1}};function at(o,e,t,r=[]){let n={...t},s=`/${o.replace(/^\//,"")}`.replace(/\{([^}]+)\}/g,(p,h)=>{let f=n[h];return delete n[h],encodeURIComponent(String(f??""))}),i=new Set(r),c={},a={};for(let[p,h]of Object.entries(n))h===void 0||h===""||(e==="GET"||i.has(p)?c[p]=h:a[p]=h);return{path:s,method:e,query:c,body:e==="POST"?a:void 0}}function lt(){return u`<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 ct=b`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 Wt=b`.interp-keywords{flex-wrap:wrap;gap:.25rem;display:flex}.interp-keywords .kw{border-radius:var(--roxy-radius-full,9999px);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 14%, transparent);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-xs,.75rem);padding:1px 8px}`,dt=b`.block{border-top:1px solid var(--roxy-border,#e4e4e7);padding-top:var(--roxy-space-md,1rem)}.block h3{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.06em}.interp-card{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);margin-bottom:var(--roxy-space-xs,.25rem)}.interp-card summary{cursor:pointer;color:var(--roxy-fg,#0a0a0a);align-items:center;gap:var(--roxy-space-sm,.5rem);font-weight:500;font-size:var(--roxy-text-sm,.875rem);display:flex}.interp-card summary:focus-visible{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px;border-radius:var(--roxy-radius-sm,4px)}.interp-lead{flex-wrap:wrap;flex:auto;order:1;align-items:baseline;gap:.4rem;min-width:0;display:inline-flex}.interp-aside{flex-shrink:0;order:2;align-items:center;gap:.5rem;display:inline-flex}.roxy-chevron{order:3}.interp-aside small{color:var(--roxy-muted,#71717a);white-space:nowrap;font-weight:400}@container (width<=26rem){.interp-card summary{flex-wrap:wrap}.roxy-chevron{order:2}.interp-aside{flex-basis:100%;order:3;justify-content:flex-end}}.interp-body{margin-top:var(--roxy-space-sm,.5rem);gap:var(--roxy-space-sm,.5rem);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);overflow-wrap:anywhere;line-height:1.6;display:grid}.interp-body p{margin:0}${Wt}`;function ht(o,e,t){let r=o.filter(n=>!!n.body);return r.length===0?d:u`<section class="block" part="section readings"><h3>${t}</h3>${r.map((n,s)=>u`<details class="interp-card" part="reading" name="${e}" ?open="${s===0}"><summary><span class="interp-lead">${n.label}</span> ${lt()} ${n.aside?u`<span class="interp-aside"><small>${n.aside}</small></span>`:d}</summary><div class="interp-body"><p>${n.body}</p>${n.extra??d}</div></details>`)}</section>`}var Vt="roxy-data";function Xt(o){return o.nodeName==="SCRIPT"&&o.getAttribute("type")==="application/json"}var ce=class{constructor(e){this.host=e,e.addController(this)}hostConnected(){if(this.host.data!=null)return;let e=this.read();e!==void 0&&(this.host.data=e,this.host.requestUpdate())}read(){let e=this.findInlineScript();return e?this.parse(e.textContent):void 0}findInlineScript(){for(let e of Array.from(this.host.children))if(Xt(e)&&e.classList.contains(Vt))return e;return null}parse(e){if(e?.trim())try{return JSON.parse(e)}catch{return}}};var m=class extends se{constructor(){super();this.data=null;this.endpoint="";this.method="POST";this.remember=!1;this.hideReadings=!1;this.hideSections="";this.loading=!1;this.error=null;this.selfFetched=!1;this.editing=!1;this.sticky=!1;this.onEdit=()=>{this.editing=!0};this.onFormSubmit=t=>{let r=t.detail;this.lastValues=r.values,this.sticky=!!r.sticky,this.selfFetched=!0,this.editing=!1,this.remember&&this.writeRemembered(r.values),this.fetcher.run(at(this.endpoint,this.method,r.values,r.queryKeys??[]))};new ce(this),this.fetcher=new le(this)}static{this.styles=[ie]}willUpdate(t){t.has("publishableKey")&&(this.fetcher.publishableKey=this.publishableKey),t.has("baseUrl")&&this.baseUrl&&(this.fetcher.baseUrl=this.baseUrl),t.has("submitUrl")&&(this.fetcher.submitUrl=this.submitUrl)}render(){return u`${this.hiddenSectionsStyle()}${this.renderState()}`}hiddenSectionsStyle(){let t=this.hideSections.split(",").map(n=>n.trim().toLowerCase()).filter(n=>/^[a-z][a-z0-9-]*$/.test(n));if(t.length===0)return d;let r=t.map(n=>`[part~="${n}"]{display:none!important}`).join("");return u`<style>${r}</style>`}renderState(){return this.loading?this.renderLoading():this.error!=null?this.renderError(this.error):this.data!=null?this.selfFetched?this.editing?this.renderForm():this.renderResult(this.data):this.showAttribution()?u`${this.renderData(this.data)}${this.renderAttribution()}`:this.renderData(this.data):this.renderNoData()}renderInterpretation(t,r,n){return this.hideReadings?d:ht(t,r,this.t(n??"Reading"))}renderResult(t){let r=this.sticky?u`${this.renderForm()}${this.renderData(t)}`:u`<div class="roxy-edit-bar" part="edit-bar"><button type="button" class="roxy-edit" @click="${this.onEdit}">${this.t("Edit query")}</button></div>${this.renderData(t)}`;return this.showAttribution()?u`${r}${this.renderAttribution()}`:r}showAttribution(){return this.attribution!=null&&this.attribution!=="off"&&this.attribution!=="false"}renderAttribution(){return u`<div class="roxy-attribution" part="attribution"><a href="https://roxyapi.com/?utm_source=widget&utm_medium=embed" target="_blank" rel="noopener">${this.t("Spiritual data by RoxyAPI")}</a></div>`}renderNoData(){return this.endpoint?this.renderForm():this.renderEmpty()}renderForm(){return u`<roxy-endpoint-form part="form" data-endpoint="${this.endpoint}" method="${this.method}" spec-url="${K(this.specUrl)}" publishable-key="${K(this.publishableKey)}" submit-label="${K(this.submitLabel)}" lang="${K(this.effectiveLang())}" .initialValues="${this.formInitialValues()}" @roxy-submit="${this.onFormSubmit}"></roxy-endpoint-form>`}formInitialValues(){return this.lastValues??(this.remember?this.readRemembered():void 0)}rememberKey(){return`roxy-ui:form:${this.endpoint}`}readRemembered(){try{let t=sessionStorage.getItem(this.rememberKey());return t?JSON.parse(t):void 0}catch{return}}writeRemembered(t){try{sessionStorage.setItem(this.rememberKey(),JSON.stringify(t))}catch{}}renderEmpty(){return u`<div class="roxy-empty" role="status" part="empty">${this.t("No data")}</div>`}renderLoading(){return u`<div class="roxy-skeleton" style="height:8rem" role="status" aria-label="${this.t("Loading")}" part="loading"></div>`}renderError(t){let r=u`<div class="roxy-error" role="alert" part="error">${this.t(t)}</div>`;return this.endpoint?u`${r}${this.renderForm()}`:r}};g([x({attribute:!1})],m.prototype,"data",2),g([x({type:String,attribute:"data-endpoint"})],m.prototype,"endpoint",2),g([x({type:String})],m.prototype,"method",2),g([x({type:String,attribute:"publishable-key"})],m.prototype,"publishableKey",2),g([x({type:String,attribute:"base-url"})],m.prototype,"baseUrl",2),g([x({type:String,attribute:"spec-url"})],m.prototype,"specUrl",2),g([x({type:String,attribute:"submit-url"})],m.prototype,"submitUrl",2),g([x({type:Boolean})],m.prototype,"remember",2),g([x({type:Boolean,attribute:"hide-readings",reflect:!0})],m.prototype,"hideReadings",2),g([x({type:String,attribute:"hide-sections",reflect:!0})],m.prototype,"hideSections",2),g([x({type:String,attribute:"submit-label"})],m.prototype,"submitLabel",2),g([x({type:String})],m.prototype,"attribution",2),g([N()],m.prototype,"loading",2),g([N()],m.prototype,"error",2),g([N()],m.prototype,"selfFetched",2),g([N()],m.prototype,"editing",2),g([N()],m.prototype,"sticky",2);var mt=14,Jt=86,gt=0,Zt=102,O=6,yt=(Jt-mt)*O,Qt=(Zt-gt)*O;function pe(o,e){return{x:(o-mt)*O,y:(e-gt)*O}}var l=50,Te=o=>2*l-o,q=1.02*O,xt=1.35*O,Pe=1.15*O,y=2.87,$=4.4,pt=5.65,ke={head:{64:[l-y,11.2],61:[l,11.2],63:[l+y,11.2]},ajna:{47:[l-y,18],24:[l,18],4:[l+y,18],17:[l-y,20.6],11:[l+y,20.6],43:[l,25.3]},throat:{62:[l-y,32.4],23:[l,32.4],56:[l+y,32.4],16:[l-$,34.7],35:[l+$,34.7],20:[l-$,37.3],12:[l+$,37.3],45:[l+$,39.6],31:[l-y,41.9],8:[l,41.9],33:[l+y,41.9]},g:{1:[l,47.7],7:[l-y,50.3],13:[l+y,50.3],10:[l-pt,53.4],25:[l+pt,53.4],15:[l-y,56.8],46:[l+y,56.8],2:[l,59.2]},heart:{21:[63.9,59.5],51:[62.1,61.3],26:[60.1,63.3],40:[66.6,63.3]},spleen:{48:[20,70.8],57:[22.5,72.4],44:[25,73.8],50:[27.7,75.3],32:[25,76.6],28:[22.5,78],18:[20,79.5]},sacral:{5:[l-y,72.7],14:[l,72.7],29:[l+y,72.7],34:[l-$,75.4],27:[l-$,79],59:[l+$,79],42:[l-y,81.7],3:[l,81.7],9:[l+y,81.7]},"solar-plexus":{},root:{53:[l-y,90.2],60:[l,90.2],52:[l+y,90.2],54:[l-$,92.6],19:[l+$,92.6],38:[l-$,95.3],39:[l+$,95.3],58:[l-$,98.1],41:[l+$,98.1]}},er={48:36,57:22,44:37,50:6,32:49,28:55,18:30};function tr(){let o={},e={};for(let[t,[r,n]]of Object.entries(ke.spleen))ke["solar-plexus"][er[Number(t)]]=[Te(r),n];for(let[t,r]of Object.entries(ke))for(let[n,[s,i]]of Object.entries(r))o[Number(n)]=pe(s,i),e[Number(n)]=t;return{points:o,centerOf:e}}var{points:Re,centerOf:Vo}=tr(),Xo=yt/2;function P(o){return o.map(([e,t])=>pe(e,t))}function Ce(o,e,t){return P([[l-o,e],[l+o,e],[l+o,t],[l-o,t]])}var Ee=5.9,ut=[[18.3,68.3],[18.3,82],[30.3,75.15]],rr=[{id:"head",label:"Head",color:"gold",points:P([[43.55,12.5],[56.45,12.5],[50,1.7]])},{id:"ajna",label:"Ajna",color:"green",points:P([[43.55,16.5],[56.45,16.5],[50,27.7]])},{id:"throat",label:"Throat",color:"brown",points:Ce(Ee,31,43.3)},{id:"g",label:"G",color:"gold",points:P([[50,45.8],[57.7,53.6],[50,61.4],[42.3,53.6]])},{id:"heart",label:"Heart",color:"red",points:P([[56.65,65.23],[64.2,56.74],[69.75,65.23]])},{id:"spleen",label:"Spleen",color:"brown",points:P(ut)},{id:"sacral",label:"Sacral",color:"red",points:Ce(Ee,71.3,83.1)},{id:"solar-plexus",label:"Solar Plexus",color:"brown",points:P(ut.map(([o,e])=>[Te(o),e]))},{id:"root",label:"Root",color:"brown",points:Ce(Ee,88.5,99.8)}],or=[[64,47],[61,24],[63,4],[17,62],[11,56],[43,23],[16,48],[20,34],[20,10],[7,31],[1,8],[13,33],[21,45],[12,22],[35,36],[57,20],[15,5],[2,14],[46,29],[34,10],[10,57],[25,51],[27,50],[57,34],[26,44],[18,58],[28,38],[32,54],[3,60],[9,52],[42,53],[59,6],[19,49],[39,55],[41,30],[37,40]],nr=sr();function sr(){let o=Te,e=[[50,3],[58,3],[60,10],[57,17.5],[56.5,20.5],[53.5,23.5],[51.5,27],[54,28],[64,30],[79,35],[83,42],[84,58],[83,74],[83,86],[76,93],[68,97],[64,99],[62,100.5],[60,100.5]],t=[`M ${de(e[0])}`];for(let r=1;r+2<e.length;r+=3)t.push(`C ${de(e[r])} ${de(e[r+1])} ${de(e[r+2])}`);t.push(`L ${he(e[e.length-1],o)}`);for(let r=e.length-3;r>=1;r-=3)t.push(`C ${he(e[r+1],o)} ${he(e[r],o)} ${he(e[r-1],o)}`);return t.push("Z"),t.join(" ")}function de([o,e]){let t=pe(o,e);return`${t.x} ${t.y}`}function he([o,e],t){let r=pe(t(o),e);return`${r.x} ${r.y}`}function ir(o){return o.map(e=>`${e.x},${e.y}`).join(" ")}function bt(o){return o.left&&o.right?"both":o.left?"src-left":"src-right"}function ar(){return v`<path class="bg-body" d=${nr} />`}function lr(o){let e=[];for(let[t,r]of or){let n=Re[t],s=Re[r];if(!n||!s)continue;e.push(v`<line class="bg-channel" x1=${n.x} y1=${n.y} x2=${s.x} y2=${s.y} />`);let i={x:(n.x+s.x)/2,y:(n.y+s.y)/2};for(let[c,a]of[[t,n],[r,s]]){let p=o.get(c);if(!p)continue;let h=bt(p);e.push(v`<line class="bg-half ${h==="both"?"src-left":h}" x1=${a.x} y1=${a.y} x2=${i.x} y2=${i.y} />`),h==="both"&&e.push(v`<line class="bg-half src-right stripe" x1=${a.x} y1=${a.y} x2=${i.x} y2=${i.y} />`)}}return e}function cr(o,e,t){return rr.flatMap(r=>{let n=o.has(r.id),s=`bg-center bg-${r.color}${n?" defined":""}`,i=e?.get(r.id)||r.label,c=r.labelAt??ur(r.points);return[v`<polygon class=${s} points=${ir(r.points)}><title>${i}: ${n?t.defined:t.open}</title></polygon>`,dr(i,c,n,r.points)]})}function dr(o,e,t,r){let n=o.split(/\s+/).filter(Boolean),s=n.reduce((h,f)=>Math.max(h,f.length),0),i=pr(r,e.y)*.86,c=Math.min(Pe,i/Math.max(1,s*hr)),a=c*1.05,p=e.y-a*(n.length-1)/2;return v`<text class="bg-center-name ${t?"defined":""}" style=${`font-size:${c}px`} x=${e.x} y=${e.y} text-anchor="middle" dominant-baseline="central" aria-hidden="true">${n.map((h,f)=>v`<tspan x=${e.x} y=${p+f*a}>${h}</tspan>`)}</text>`}var hr=.66;function pr(o,e){let t=[];for(let r=0;r<o.length;r++){let n=o[r],s=o[(r+1)%o.length];if(n.y===s.y)continue;let i=Math.min(n.y,s.y),c=Math.max(n.y,s.y);e<i||e>c||t.push(n.x+(e-n.y)/(s.y-n.y)*(s.x-n.x))}return t.length<2?0:Math.max(...t)-Math.min(...t)}function ur(o){let e=o.length||1;return{x:o.reduce((t,r)=>t+r.x,0)/e,y:o.reduce((t,r)=>t+r.y,0)/e}}function ft(o,e){return`M ${o.x} ${o.y-q} A ${q} ${q} 0 0 ${e} ${o.x} ${o.y+q} Z`}function fr(o,e){let t=[];for(let[r,n]of Object.entries(Re)){let s=Number(r),i=o.get(s),c=i?bt(i):"",a=e.get(s);t.push(v`<g class="bg-gate-node">
|
|
284
|
+
${c==="both"?[v`<path class="bg-gate-dot on src-left" d=${ft(n,0)} />`,v`<path class="bg-gate-dot on src-right" d=${ft(n,1)} />`]:v`<circle class="bg-gate-dot ${c&&`on ${c}`}" cx=${n.x} cy=${n.y} r=${q} />`}
|
|
285
285
|
<text class="bg-gate ${i?"on":""}" x=${n.x} y=${n.y} text-anchor="middle" dominant-baseline="central">${s}</text>
|
|
286
|
-
${a
|
|
287
|
-
</g>`)}return t}var
|
|
288
|
-
${
|
|
289
|
-
${
|
|
290
|
-
${
|
|
291
|
-
${
|
|
292
|
-
`}var $t=b`.chart{width:100%;max-width:var(--roxy-chart-max-width,30rem);height:auto;margin:0 auto;display:block}@container (width<=26rem){.chart{width:calc(100% + 2 * var(--roxy-space-lg,1.5rem));margin-inline:calc(-1 * var(--roxy-space-lg,1.5rem))}}.bg-body{fill:color-mix(in srgb, var(--roxy-secondary,#475569) 8%, transparent);stroke:var(--roxy-border,#e4e4e7);stroke-width:1px}.bg-channel{stroke:var(--roxy-border,#e4e4e7);stroke-width:5px;stroke-linecap:round}.bg-half{stroke-width:5px;stroke-linecap:round}.bg-half.stripe{stroke-linecap:butt;stroke-dasharray:7 7}.bg-center{fill:var(--roxy-surface,#fff);stroke:var(--roxy-secondary,#475569);stroke-width:1.8px}.bg-center.defined{stroke:color-mix(in srgb, var(--roxy-fg,#0a0a0a) 45%, transparent)}:host{--center-gold:#e0a200;--center-green:#2f8f00;--center-red:#c41f1f;--center-brown:#76502f}.bg-center.bg-gold.defined,.legend .swatch.bg-gold{fill:var(--center-gold);background:var(--center-gold)}.bg-center.bg-green.defined,.legend .swatch.bg-green{fill:var(--center-green);background:var(--center-green)}.bg-center.bg-red.defined,.legend .swatch.bg-red{fill:var(--center-red);background:var(--center-red)}.bg-center.bg-brown.defined,.legend .swatch.bg-brown{fill:var(--center-brown);background:var(--center-brown)}.bg-gate-dot{fill:var(--roxy-surface,#fff);stroke:var(--roxy-border,#e4e4e7);stroke-width:1px}.bg-gate-dot.on{stroke:none}.bg-gate{fill:var(--roxy-muted,#71717a);font-size:${yt}px;font-weight:600;font-family:var(--roxy-font-sans)}.bg-gate.on{fill:var(--src-ink,var(--roxy-surface,#fff))}.legend{gap:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);flex-wrap:wrap;display:flex}.legend .swatch{vertical-align:middle;border:1px solid var(--roxy-secondary,#475569);border-radius:2px;width:10px;height:10px;margin-right:4px;display:inline-block}.bg-half.src-left{stroke:var(--src-left)}.bg-half.src-right{stroke:var(--src-right)}.bg-gate-dot.on.src-left{fill:var(--src-left)}.bg-gate-dot.on.src-right{fill:var(--src-right)}.legend .swatch.src-left{background:var(--src-left)}.legend .swatch.src-right{background:var(--src-right)}.legend .swatch.source{border-radius:var(--roxy-radius-full,9999px);border-color:#0000}`;var wt=b`.facts{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fit,minmax(8rem,1fr));display:grid}.fact{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);background:var(--roxy-surface,#fff)}.fact span{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;display:block}.fact strong{font-size:var(--roxy-text-base,1rem);color:var(--roxy-fg,#0a0a0a)}.lead{color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);margin:0;line-height:1.6}.themes{gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.pill{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);padding:2px 10px}.pill--good{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--roxy-success-fg,#166534)}.pill--shadow{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 16%, transparent);color:var(--roxy-danger-fg,#991b1b)}.keynotes{gap:var(--roxy-space-xs,.25rem);margin:0;display:grid}.keynotes dt{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.05em}.keynotes dd{margin:0}`;function St(o){let e=o.filter(t=>!!t.value);return e.length===0?d:u`<div class="facts" part="facts">${e.map(t=>u`<div class="fact" part="fact"><span>${t.label}</span> <strong>${t.value}</strong></div>`)}</div>`}var I=class extends m{renderChart(e){let t=new Map;for(let i of e.channels??[]){let c=new Set(i.personAGates??[]),a=new Set(i.personBGates??[]);for(let h of[i.gateA,i.gateB]){if(h==null)continue;let p=t.get(h)??{left:!1,right:!1};p.left||=c.has(h),p.right||=a.has(h),t.set(h,p)}}let r=new Set((e.centers??[]).filter(i=>i.defined).map(i=>i.id)),n=new Map((e.centers??[]).map(i=>[i.id,i.name])),s=new Map;for(let i of e.channels??[]){let c=i.name;for(let a of[i.gateA,i.gateB]){if(a==null)continue;let h=t.get(a),p=[h?.left&&"A",h?.right&&"B"].filter(Boolean).join(" + ");s.set(a,[`Gate ${a}`,c,p].filter(Boolean).join(" · "))}}return u`<svg class="chart" part="chart" viewBox="${bt}" preserveAspectRatio="xMidYMid meet" role="img" aria-label="Combined Human Design bodygraph for two charts, with each gate marked for the person who carries it"><title>Combined bodygraph</title>${vt({definedCenters:r,gateSources:t,gateTitles:s,centerNames:n,stateWords:{defined:"Defined",open:"Open"}})}</svg><div class="legend" part="legend"><span><span class="swatch source src-left"></span>Person A</span> <span><span class="swatch source src-right"></span>Person B</span> <span><span class="swatch"></span>Open center</span></div>`}renderData(e){let t=e.channels??[],r=e.centers??[],n=r.filter(s=>s.defined).length;return u`<div class="wrap" part="card" aria-label="Human Design connection"><header class="head" part="header"><h2 class="title">Connection</h2>${typeof e.totalChannels=="number"?u`<span class="count">${e.totalChannels} channels</span>`:d}</header>${this.renderChart(e)} ${St([{label:"Channels",value:e.totalChannels?.toString()},{label:"Combined definition",value:e.combinedDefinition?oe(String(e.combinedDefinition)):void 0},{label:"Centers defined",value:r.length>0?`${n} of ${r.length}`:void 0}])} ${this.hideReadings?d:u`<p class="lead">A connection chart reads the two charts as one bodygraph. Wherever the two of them together hold both gates of a channel, that channel is defined between them, and the centers it joins are defined in the connection whether or not either person defines them alone.</p>`} ${this.renderDynamics(e.summary)} ${this.renderCenters(r)} ${this.renderChannels(t,r)}</div>`}renderDynamics(e){if(!e)return d;let t=[{label:"Electromagnetic",aside:ue(e.electromagnetic),body:"Each person holds one of the two gates, so the channel completes only when they are together. The classic point of attraction."},{label:"Dominance",aside:ue(e.dominance),body:"One person holds both gates and the other holds neither, so the conditioning runs one way, from the person who carries the channel to the person who does not."},{label:"Compromise",aside:ue(e.compromise),body:"One person holds both gates and the other holds a single hanging gate of the same channel, so the channel is complete for one of them and half open for the other."},{label:"Companionship",aside:ue(e.companionship),body:"Both people independently hold both gates, so neither needs the other to complete it. A shared and familiar frequency rather than an attraction."}];return this.renderInterpretation(t,"hd-connection-dynamic","Dynamics")}renderCenters(e){return e.length===0?d:u`<section class="block" part="section centers"><h3>Centers</h3>${this.hideReadings?d:u`<p class="note">Defined is the state of the combined chart. Beside it is who already defines that center in their own chart. A center defined only together is what the connection itself creates: it is there when the two are together and gone when they are apart. The combined definition counts how the defined centers hang together, so Single is one connected piece and a split is more than one.</p>`} ${e.map(t=>{let r=t.definedBy??[],n=r.includes("A"),s=r.includes("B"),i=!!t.defined&&!n&&!s;return u`<div class="row"><span class="cname">${t.name??oe(String(t.id??""))}</span> <span class="badge ${t.defined?i?"together":"defined":"open"}">${t.defined?i?"Only together":"Defined":"Open"} </span><span class="who">${dr(!!t.defined,n,s)}</span></div>`})}</section>`}renderChannels(e,t){if(e.length===0)return d;let r=new Map(t.map(s=>[String(s.id??""),s.name??""])),n=s=>r.get(s)||oe(s);return u`<section class="block" part="section channels"><h3>Channels</h3><div class="scroll" part="table" tabindex="0" role="region" aria-label="Connection channels"><table role="table"><caption class="roxy-sr-only">Connection channels: each channel with its gates, the centers it links, its circuit and dynamic, and the gates person A and person B each hold.</caption><thead><tr><th scope="col">Channel</th><th scope="col">Gates</th><th scope="col">Centers</th><th scope="col">Circuit</th><th scope="col">Dynamic</th><th scope="col">Person A holds</th><th scope="col">Person B holds</th></tr></thead><tbody>${e.map(s=>u`<tr><td>${s.name??""}</td><td class="gates">${s.gateA}-${s.gateB}</td><td>${(s.centers??[]).map(n).join(" to ")}</td><td>${s.circuit??""}</td><td>${s.dynamic?u`<span class="dyn">${s.dynamic}</span>`:d}</td><td class="held">${_t(s.personAGates)}</td><td class="held">${_t(s.personBGates)}</td></tr>`)}</tbody></table></div></section>`}};I.styles=[ie,lt,ct,wt,$t,b`.wrap{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);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.count{color:var(--roxy-accent-ink,#b45309);font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);font-variant-numeric:tabular-nums}.note{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);line-height:1.6}.row{align-items:center;gap:var(--roxy-space-sm,.5rem);padding:var(--roxy-space-sm,.5rem) 0;border-bottom:1px solid var(--roxy-border,#e4e4e7);font-size:var(--roxy-text-sm,.875rem);flex-wrap:wrap;display:flex}.row:last-child{border-bottom:none}.cname{flex:1;min-width:8rem}.badge{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);padding:1px 8px;display:inline-flex}.badge.defined{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--roxy-success-fg,#166534)}.badge.open{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 45%, transparent);color:var(--roxy-fg,#0a0a0a)}.badge.together{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 18%, transparent);color:var(--roxy-fg,#0a0a0a)}.who{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem)}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}th,td{text-align:left;padding:var(--roxy-space-sm,.5rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);white-space:nowrap}th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.04em}tbody tr:last-child td{border-bottom:none}.gates{font-variant-numeric:tabular-nums;color:var(--roxy-accent-ink,#b45309);font-weight:var(--roxy-weight-bold,600)}.dyn{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 16%, transparent);color:var(--roxy-fg,#0a0a0a);padding:1px 8px;display:inline-block}.held{font-variant-numeric:tabular-nums}.scroll{min-width:0;overflow-x:auto}.wrap{--src-left:#1f6fb2;--src-right:#b04e14;--src-ink:#fff}`],I=g([Xe("roxy-hd-connection")],I);function ue(o){if(typeof o=="number")return o===0?"None":o===1?"1 channel":`${o} channels`}function _t(o){let e=o??[];return e.length>0?e.join(", "):"Neither"}function dr(o,e,t){return e&&t?"Defined in both charts":e?"Defined by A":t?"Defined by B":o?"Defined by neither alone, only by the connection":"Open in both charts"}X();return Rt(hr);})();
|
|
286
|
+
${a?v`<title>${a}</title>`:d}
|
|
287
|
+
</g>`)}return t}var vt=`0 0 ${yt} ${Qt}`;function $t(o){return v`
|
|
288
|
+
${ar()}
|
|
289
|
+
${lr(o.gateSources)}
|
|
290
|
+
${cr(o.definedCenters,o.centerNames,o.stateWords??{defined:"defined",open:"open"})}
|
|
291
|
+
${fr(o.gateSources,o.gateTitles)}
|
|
292
|
+
`}var wt=b`.chart{width:100%;max-width:var(--roxy-chart-max-width,30rem);height:auto;margin:0 auto;display:block}@container (width<=26rem){.chart{width:calc(100% + 2 * var(--roxy-space-lg,1.5rem));margin-inline:calc(-1 * var(--roxy-space-lg,1.5rem))}}.bg-body{fill:color-mix(in srgb, var(--roxy-secondary,#475569) 8%, transparent);stroke:var(--roxy-border,#e4e4e7);stroke-width:1px}.bg-channel{stroke:var(--roxy-border,#e4e4e7);stroke-width:5px;stroke-linecap:round}.bg-half{stroke-width:5px;stroke-linecap:round}.bg-half.stripe{stroke-linecap:butt;stroke-dasharray:7 7}.bg-center{fill:var(--roxy-surface,#fff);stroke:var(--roxy-secondary,#475569);stroke-width:1.8px}.bg-center.defined{stroke:color-mix(in srgb, var(--roxy-fg,#0a0a0a) 45%, transparent)}:host{--center-gold:#e0a200;--center-green:#2f8f00;--center-red:#c41f1f;--center-brown:#76502f}.bg-center.bg-gold.defined,.legend .swatch.bg-gold{fill:var(--center-gold);background:var(--center-gold)}.bg-center.bg-green.defined,.legend .swatch.bg-green{fill:var(--center-green);background:var(--center-green)}.bg-center.bg-red.defined,.legend .swatch.bg-red{fill:var(--center-red);background:var(--center-red)}.bg-center.bg-brown.defined,.legend .swatch.bg-brown{fill:var(--center-brown);background:var(--center-brown)}.bg-gate-dot{fill:var(--roxy-surface,#fff);stroke:var(--roxy-border,#e4e4e7);stroke-width:1px}.bg-gate-dot.on{stroke:none}.bg-center-name{fill:var(--roxy-muted,#71717a);opacity:.5;font-size:${Pe}px;letter-spacing:.08em;text-transform:uppercase;pointer-events:none;font-weight:600}.bg-center-name.defined{fill:var(--roxy-surface,#fff);opacity:.62}.bg-gate{fill:var(--roxy-muted,#71717a);font-size:${xt}px;font-weight:600;font-family:var(--roxy-font-sans)}.bg-gate.on{fill:var(--src-ink,var(--roxy-surface,#fff))}.legend{gap:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);flex-wrap:wrap;display:flex}.legend .swatch{vertical-align:middle;border:1px solid var(--roxy-secondary,#475569);border-radius:2px;width:10px;height:10px;margin-right:4px;display:inline-block}.bg-half.src-left{stroke:var(--src-left)}.bg-half.src-right{stroke:var(--src-right)}.bg-gate-dot.on.src-left{fill:var(--src-left)}.bg-gate-dot.on.src-right{fill:var(--src-right)}.legend .swatch.src-left{background:var(--src-left)}.legend .swatch.src-right{background:var(--src-right)}.legend .swatch.source{border-radius:var(--roxy-radius-full,9999px);border-color:#0000}`;var St=b`.facts{gap:var(--roxy-space-sm,.5rem);grid-template-columns:repeat(auto-fit,minmax(8rem,1fr));display:grid}.fact{border:1px solid var(--roxy-border,#e4e4e7);border-radius:var(--roxy-radius-md,8px);padding:var(--roxy-space-sm,.5rem) var(--roxy-space-md,1rem);background:var(--roxy-surface,#fff)}.fact span{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem);text-transform:uppercase;letter-spacing:.06em;display:block}.fact strong{font-size:var(--roxy-text-base,1rem);color:var(--roxy-fg,#0a0a0a)}.lead{color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-sm,.875rem);margin:0;line-height:1.6}.themes{gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.pill{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);padding:2px 10px}.pill--good{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--roxy-success-fg,#166534)}.pill--shadow{background:color-mix(in srgb, var(--roxy-danger,#dc2626) 16%, transparent);color:var(--roxy-danger-fg,#991b1b)}.keynotes{gap:var(--roxy-space-xs,.25rem);margin:0;display:grid}.keynotes dt{font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);text-transform:uppercase;letter-spacing:.05em}.keynotes dd{margin:0}`;function _t(o){let e=o.filter(t=>!!t.value);return e.length===0?d:u`<div class="facts" part="facts">${e.map(t=>u`<div class="fact" part="fact"><span>${t.label}</span> <strong>${t.value}</strong></div>`)}</div>`}var U=class extends m{renderChart(e){let t=new Map;for(let i of e.channels??[]){let c=new Set(i.personAGates??[]),a=new Set(i.personBGates??[]);for(let p of[i.gateA,i.gateB]){if(p==null)continue;let h=t.get(p)??{left:!1,right:!1};h.left||=c.has(p),h.right||=a.has(p),t.set(p,h)}}let r=new Set((e.centers??[]).filter(i=>i.defined).map(i=>i.id)),n=new Map((e.centers??[]).map(i=>[i.id,i.name])),s=new Map;for(let i of e.channels??[]){let c=i.name;for(let a of[i.gateA,i.gateB]){if(a==null)continue;let p=t.get(a),h=[p?.left&&"A",p?.right&&"B"].filter(Boolean).join(" + ");s.set(a,[`Gate ${a}`,c,h].filter(Boolean).join(" · "))}}return u`<svg class="chart" part="chart" viewBox="${vt}" preserveAspectRatio="xMidYMid meet" role="img" aria-label="Combined Human Design bodygraph for two charts, with each gate marked for the person who carries it"><title>Combined bodygraph</title>${$t({definedCenters:r,gateSources:t,gateTitles:s,centerNames:n,stateWords:{defined:"Defined",open:"Open"}})}</svg><div class="legend" part="legend"><span><span class="swatch source src-left"></span>Person A</span> <span><span class="swatch source src-right"></span>Person B</span> <span><span class="swatch"></span>Open center</span></div>`}renderData(e){let t=e.channels??[],r=e.centers??[],n=r.filter(s=>s.defined).length;return u`<div class="wrap" part="card" aria-label="Human Design connection"><header class="head" part="header"><h2 class="title">Connection</h2>${typeof e.totalChannels=="number"?u`<span class="count">${e.totalChannels} channels</span>`:d}</header>${this.renderChart(e)} ${_t([{label:"Channels",value:e.totalChannels?.toString()},{label:"Combined definition",value:e.combinedDefinition?oe(String(e.combinedDefinition)):void 0},{label:"Centers defined",value:r.length>0?`${n} of ${r.length}`:void 0}])} ${this.hideReadings?d:u`<p class="lead">A connection chart reads the two charts as one bodygraph. Wherever the two of them together hold both gates of a channel, that channel is defined between them, and the centers it joins are defined in the connection whether or not either person defines them alone.</p>`} ${this.renderDynamics(e.summary)} ${this.renderCenters(r)} ${this.renderChannels(t,r)}</div>`}renderDynamics(e){if(!e)return d;let t=[{label:"Electromagnetic",aside:ue(e.electromagnetic),body:"Each person holds one of the two gates, so the channel completes only when they are together. The classic point of attraction."},{label:"Dominance",aside:ue(e.dominance),body:"One person holds both gates and the other holds neither, so the conditioning runs one way, from the person who carries the channel to the person who does not."},{label:"Compromise",aside:ue(e.compromise),body:"One person holds both gates and the other holds a single hanging gate of the same channel, so the channel is complete for one of them and half open for the other."},{label:"Companionship",aside:ue(e.companionship),body:"Both people independently hold both gates, so neither needs the other to complete it. A shared and familiar frequency rather than an attraction."}];return this.renderInterpretation(t,"hd-connection-dynamic","Dynamics")}renderCenters(e){return e.length===0?d:u`<section class="block" part="section centers"><h3>Centers</h3>${this.hideReadings?d:u`<p class="note">Defined is the state of the combined chart. Beside it is who already defines that center in their own chart. A center defined only together is what the connection itself creates: it is there when the two are together and gone when they are apart. The combined definition counts how the defined centers hang together, so Single is one connected piece and a split is more than one.</p>`} ${e.map(t=>{let r=t.definedBy??[],n=r.includes("A"),s=r.includes("B"),i=!!t.defined&&!n&&!s;return u`<div class="row"><span class="cname">${t.name??oe(String(t.id??""))}</span> <span class="badge ${t.defined?i?"together":"defined":"open"}">${t.defined?i?"Only together":"Defined":"Open"} </span><span class="who">${mr(!!t.defined,n,s)}</span></div>`})}</section>`}renderChannels(e,t){if(e.length===0)return d;let r=new Map(t.map(s=>[String(s.id??""),s.name??""])),n=s=>r.get(s)||oe(s);return u`<section class="block" part="section channels"><h3>Channels</h3><div class="scroll" part="table" tabindex="0" role="region" aria-label="Connection channels"><table role="table"><caption class="roxy-sr-only">Connection channels: each channel with its gates, the centers it links, its circuit and dynamic, and the gates person A and person B each hold.</caption><thead><tr><th scope="col">Channel</th><th scope="col">Gates</th><th scope="col">Centers</th><th scope="col">Circuit</th><th scope="col">Dynamic</th><th scope="col">Person A holds</th><th scope="col">Person B holds</th></tr></thead><tbody>${e.map(s=>u`<tr><td>${s.name??""}</td><td class="gates">${s.gateA}-${s.gateB}</td><td>${(s.centers??[]).map(n).join(" to ")}</td><td>${s.circuit??""}</td><td>${s.dynamic?u`<span class="dyn">${s.dynamic}</span>`:d}</td><td class="held">${At(s.personAGates)}</td><td class="held">${At(s.personBGates)}</td></tr>`)}</tbody></table></div></section>`}};U.styles=[ie,ct,dt,St,wt,b`.wrap{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);gap:var(--roxy-space-md,1rem);grid-template-columns:minmax(0,1fr);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-sm,.5rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.count{color:var(--roxy-accent-ink,#b45309);font-size:var(--roxy-text-sm,.875rem);font-weight:var(--roxy-weight-bold,600);font-variant-numeric:tabular-nums}.note{margin:0 0 var(--roxy-space-sm,.5rem);font-size:var(--roxy-text-xs,.75rem);color:var(--roxy-muted,#71717a);line-height:1.6}.row{align-items:center;gap:var(--roxy-space-sm,.5rem);padding:var(--roxy-space-sm,.5rem) 0;border-bottom:1px solid var(--roxy-border,#e4e4e7);font-size:var(--roxy-text-sm,.875rem);flex-wrap:wrap;display:flex}.row:last-child{border-bottom:none}.cname{flex:1;min-width:8rem}.badge{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);font-weight:var(--roxy-weight-bold,600);padding:1px 8px;display:inline-flex}.badge.defined{background:color-mix(in srgb, var(--roxy-success,#16a34a) 16%, transparent);color:var(--roxy-success-fg,#166534)}.badge.open{background:color-mix(in srgb, var(--roxy-border,#e4e4e7) 45%, transparent);color:var(--roxy-fg,#0a0a0a)}.badge.together{background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 18%, transparent);color:var(--roxy-fg,#0a0a0a)}.who{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-xs,.75rem)}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}th,td{text-align:left;padding:var(--roxy-space-sm,.5rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);white-space:nowrap}th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.04em}tbody tr:last-child td{border-bottom:none}.gates{font-variant-numeric:tabular-nums;color:var(--roxy-accent-ink,#b45309);font-weight:var(--roxy-weight-bold,600)}.dyn{border-radius:var(--roxy-radius-full,9999px);font-size:var(--roxy-text-xs,.75rem);background:color-mix(in srgb, var(--roxy-accent,#f59e0b) 16%, transparent);color:var(--roxy-fg,#0a0a0a);padding:1px 8px;display:inline-block}.held{font-variant-numeric:tabular-nums}.scroll{min-width:0;overflow-x:auto}.wrap{--src-left:#1f6fb2;--src-right:#b04e14;--src-ink:#fff}`],U=g([Je("roxy-hd-connection")],U);function ue(o){if(typeof o=="number")return o===0?"None":o===1?"1 channel":`${o} channels`}function At(o){let e=o??[];return e.length>0?e.join(", "):"Neither"}function mr(o,e,t){return e&&t?"Defined in both charts":e?"Defined by A":t?"Defined by B":o?"Defined by neither alone, only by the connection":"Open in both charts"}X();return Tt(gr);})();
|
|
293
293
|
/*! Bundled license information:
|
|
294
294
|
|
|
295
295
|
@lit/reactive-element/css-tag.js:
|