@pure-ds/core 0.4.18 → 0.4.19

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,6 +1,6 @@
1
1
  var xr=Object.defineProperty;var kr=(r,e)=>()=>(r&&(e=r(r=0)),e);var bt=(r,e)=>{for(var t in e)xr(r,t,{get:e[t],enumerable:!0})};var ir={};bt(ir,{AutoDefiner:()=>lt});async function no(...r){let e={};r.length&&typeof r[r.length-1]=="object"&&(e=r.pop()||{});let t=r,{baseURL:a,mapper:o=l=>`${l}.js`,onError:i=(l,d)=>console.error(`[defineWebComponents] ${l}:`,d)}=e,s=a?new URL(a,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),n=l=>l.toLowerCase().replace(/(^|-)([a-z])/g,(d,p,h)=>h.toUpperCase()),c=async l=>{try{if(customElements.get(l))return{tag:l,status:"already-defined"};let d=o(l),h=await import(d instanceof URL?d.href:new URL(d,s).href),g=h?.default??h?.[n(l)];if(!g){if(customElements.get(l))return{tag:l,status:"self-defined"};throw new Error(`No export found for ${l}. Expected default export or named export "${n(l)}".`)}return customElements.get(l)?{tag:l,status:"race-already-defined"}:(customElements.define(l,g),{tag:l,status:"defined"})}catch(d){throw i(l,d),d}};return Promise.all(t.map(c))}var lt,sr=kr(()=>{lt=class{constructor(e={}){let{baseURL:t,mapper:a,onError:o,predicate:i=()=>!0,attributeModule:s="data-module",root:n=document,scanExisting:c=!0,debounceMs:l=16,observeShadows:d=!0,enhancers:p=[],patchAttachShadow:h=!0}=e,g=new Set,y=new Set,f=new Set,b=new Map,_=new WeakMap,O=new WeakMap,F=0,E=!1,A=null,M=v=>{if(!v||!p.length)return;let x=O.get(v);x||(x=new Set,O.set(v,x));for(let w of p)if(!(!w.selector||!w.run)&&!x.has(w.selector))try{v.matches&&v.matches(w.selector)&&(w.run(v),x.add(w.selector))}catch(P){console.warn(`[AutoDefiner] Error applying enhancer for selector "${w.selector}":`,P)}},I=(v,x)=>{if(!E&&!(!v||!v.includes("-"))&&!customElements.get(v)&&!y.has(v)&&!f.has(v)){if(x&&x.getAttribute){let w=x.getAttribute(s);w&&!b.has(v)&&b.set(v,w)}g.add(v),Ge()}},Ge=()=>{F||(F=setTimeout(gt,l))},D=v=>{if(v){if(v.nodeType===1){let x=v,w=x.tagName?.toLowerCase();w&&w.includes("-")&&!customElements.get(w)&&i(w,x)&&I(w,x),M(x),d&&x.shadowRoot&&Ve(x.shadowRoot)}v.querySelectorAll&&v.querySelectorAll("*").forEach(x=>{let w=x.tagName?.toLowerCase();w&&w.includes("-")&&!customElements.get(w)&&i(w,x)&&I(w,x),M(x),d&&x.shadowRoot&&Ve(x.shadowRoot)})}},Ve=v=>{if(!v||_.has(v))return;D(v);let x=new MutationObserver(w=>{for(let P of w)P.addedNodes?.forEach(te=>{D(te)}),P.type==="attributes"&&P.target&&D(P.target)});x.observe(v,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[s,...p.map(w=>w.selector).filter(w=>w.startsWith("data-"))]}),_.set(v,x)};async function gt(){if(clearTimeout(F),F=0,!g.size)return;let v=Array.from(g);g.clear(),v.forEach(x=>y.add(x));try{let x=w=>b.get(w)??(a?a(w):`${w}.js`);await no(...v,{baseURL:t,mapper:x,onError:(w,P)=>{f.add(w),o?.(w,P)}})}catch{}finally{v.forEach(x=>y.delete(x))}}let mt=n===document?document.documentElement:n,ft=new MutationObserver(v=>{for(let x of v)x.addedNodes?.forEach(w=>{D(w)}),x.type==="attributes"&&x.target&&D(x.target)});if(ft.observe(mt,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[s,...p.map(v=>v.selector).filter(v=>v.startsWith("data-"))]}),d&&h&&Element.prototype.attachShadow){let v=Element.prototype.attachShadow;Element.prototype.attachShadow=function(w){let P=v.call(this,w);if(w&&w.mode==="open"){Ve(P);let te=this.tagName?.toLowerCase();te&&te.includes("-")&&!customElements.get(te)&&I(te,this)}return P},A=()=>Element.prototype.attachShadow=v}return c&&D(mt),{stop(){E=!0,ft.disconnect(),A&&A(),F&&(clearTimeout(F),F=0),_.forEach(v=>v.disconnect())},flush:gt}}static async define(...e){let t={};e.length&&typeof e[e.length-1]=="object"&&(t=e.pop()||{});let a=e,{baseURL:o,mapper:i=d=>`${d}.js`,onError:s=(d,p)=>console.error(`[defineWebComponents] ${d}:`,p)}=t,n=o?new URL(o,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),c=d=>d.toLowerCase().replace(/(^|-)([a-z])/g,(p,h,g)=>g.toUpperCase()),l=async d=>{try{if(customElements.get(d))return{tag:d,status:"already-defined"};let p=i(d),g=await import(p instanceof URL?p.href:new URL(p,n).href),y=g?.default??g?.[c(d)];if(!y){if(customElements.get(d))return{tag:d,status:"self-defined"};throw new Error(`No export found for ${d}. Expected default export or named export "${c(d)}".`)}return customElements.get(d)?{tag:d,status:"race-already-defined"}:(customElements.define(d,y),{tag:d,status:"defined"})}catch(p){throw s(d,p),p}};return Promise.all(a.map(l))}}});var ve=globalThis,xe=ve.ShadowRoot&&(ve.ShadyCSS===void 0||ve.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,vt=Symbol(),yt=new WeakMap,we=class{constructor(e,t,a){if(this._$cssResult$=!0,a!==vt)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(xe&&e===void 0){let a=t!==void 0&&t.length===1;a&&(e=yt.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),a&&yt.set(t,e))}return e}toString(){return this.cssText}},wt=r=>new we(typeof r=="string"?r:r+"",void 0,vt);var xt=(r,e)=>{if(xe)r.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of e){let a=document.createElement("style"),o=ve.litNonce;o!==void 0&&a.setAttribute("nonce",o),a.textContent=t.cssText,r.appendChild(a)}},Je=xe?r=>r:r=>r instanceof CSSStyleSheet?(e=>{let t="";for(let a of e.cssRules)t+=a.cssText;return wt(t)})(r):r;var{is:$r,defineProperty:Cr,getOwnPropertyDescriptor:Er,getOwnPropertyNames:Tr,getOwnPropertySymbols:Ar,getPrototypeOf:zr}=Object,ke=globalThis,kt=ke.trustedTypes,_r=kt?kt.emptyScript:"",Mr=ke.reactiveElementPolyfillSupport,se=(r,e)=>r,Ke={toAttribute(r,e){switch(e){case Boolean:r=r?_r:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,e){let t=r;switch(e){case Boolean:t=r!==null;break;case Number:t=r===null?null:Number(r);break;case Object:case Array:try{t=JSON.parse(r)}catch{t=null}}return t}},$t=(r,e)=>!$r(r,e),St={attribute:!0,type:String,converter:Ke,reflect:!1,useDefault:!1,hasChanged:$t};Symbol.metadata??=Symbol("metadata"),ke.litPropertyMetadata??=new WeakMap;var N=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=St){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 a=Symbol(),o=this.getPropertyDescriptor(e,a,t);o!==void 0&&Cr(this.prototype,e,o)}}static getPropertyDescriptor(e,t,a){let{get:o,set:i}=Er(this.prototype,e)??{get(){return this[t]},set(s){this[t]=s}};return{get:o,set(s){let n=o?.call(this);i?.call(this,s),this.requestUpdate(e,n,a)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??St}static _$Ei(){if(this.hasOwnProperty(se("elementProperties")))return;let e=zr(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(se("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(se("properties"))){let t=this.properties,a=[...Tr(t),...Ar(t)];for(let o of a)this.createProperty(o,t[o])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[a,o]of t)this.elementProperties.set(a,o)}this._$Eh=new Map;for(let[t,a]of this.elementProperties){let o=this._$Eu(t,a);o!==void 0&&this._$Eh.set(o,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let a=new Set(e.flat(1/0).reverse());for(let o of a)t.unshift(Je(o))}else e!==void 0&&t.push(Je(e));return t}static _$Eu(e,t){let a=t.attribute;return a===!1?void 0:typeof a=="string"?a: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 a of t.keys())this.hasOwnProperty(a)&&(e.set(a,this[a]),delete this[a]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return xt(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,a){this._$AK(e,a)}_$ET(e,t){let a=this.constructor.elementProperties.get(e),o=this.constructor._$Eu(e,a);if(o!==void 0&&a.reflect===!0){let i=(a.converter?.toAttribute!==void 0?a.converter:Ke).toAttribute(t,a.type);this._$Em=e,i==null?this.removeAttribute(o):this.setAttribute(o,i),this._$Em=null}}_$AK(e,t){let a=this.constructor,o=a._$Eh.get(e);if(o!==void 0&&this._$Em!==o){let i=a.getPropertyOptions(o),s=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:Ke;this._$Em=o;let n=s.fromAttribute(t,i.type);this[o]=n??this._$Ej?.get(o)??n,this._$Em=null}}requestUpdate(e,t,a){if(e!==void 0){let o=this.constructor,i=this[e];if(a??=o.getPropertyOptions(e),!((a.hasChanged??$t)(i,t)||a.useDefault&&a.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(o._$Eu(e,a))))return;this.C(e,t,a)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:a,reflect:o,wrapped:i},s){a&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,s??t??this[e]),i!==!0||s!==void 0)||(this._$AL.has(e)||(this.hasUpdated||a||(t=void 0),this._$AL.set(e,t)),o===!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[o,i]of this._$Ep)this[o]=i;this._$Ep=void 0}let a=this.constructor.elementProperties;if(a.size>0)for(let[o,i]of a){let{wrapped:s}=i,n=this[o];s!==!0||this._$AL.has(o)||n===void 0||this.C(o,void 0,i,n)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(a=>a.hostUpdate?.()),this.update(t)):this._$EM()}catch(a){throw e=!1,this._$EM(),a}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){}};N.elementStyles=[],N.shadowRootOptions={mode:"open"},N[se("elementProperties")]=new Map,N[se("finalized")]=new Map,Mr?.({ReactiveElement:N}),(ke.reactiveElementVersions??=[]).push("2.1.1");var Ye=globalThis,Se=Ye.trustedTypes,Ct=Se?Se.createPolicy("lit-html",{createHTML:r=>r}):void 0,Ze="$lit$",B=`lit$${Math.random().toFixed(9).slice(2)}$`,Xe="?"+B,Lr=`<${Xe}>`,V=document,ce=()=>V.createComment(""),le=r=>r===null||typeof r!="object"&&typeof r!="function",et=Array.isArray,Mt=r=>et(r)||typeof r?.[Symbol.iterator]=="function",Qe=`[
2
2
  \f\r]`,ne=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Et=/-->/g,Tt=/>/g,q=RegExp(`>|${Qe}(?:([^\\s"'>=/]+)(${Qe}*=${Qe}*(?:[^
3
- \f\r"'\`<>=]|("|')|))|$)`,"g"),At=/'/g,zt=/"/g,Lt=/^(?:script|style|textarea|title)$/i,tt=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),ze=tt(1),rt=tt(2),Dt=tt(3),T=Symbol.for("lit-noChange"),k=Symbol.for("lit-nothing"),_t=new WeakMap,G=V.createTreeWalker(V,129);function Pt(r,e){if(!et(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ct!==void 0?Ct.createHTML(e):e}var Rt=(r,e)=>{let t=r.length-1,a=[],o,i=e===2?"<svg>":e===3?"<math>":"",s=ne;for(let n=0;n<t;n++){let c=r[n],l,d,p=-1,h=0;for(;h<c.length&&(s.lastIndex=h,d=s.exec(c),d!==null);)h=s.lastIndex,s===ne?d[1]==="!--"?s=Et:d[1]!==void 0?s=Tt:d[2]!==void 0?(Lt.test(d[2])&&(o=RegExp("</"+d[2],"g")),s=q):d[3]!==void 0&&(s=q):s===q?d[0]===">"?(s=o??ne,p=-1):d[1]===void 0?p=-2:(p=s.lastIndex-d[2].length,l=d[1],s=d[3]===void 0?q:d[3]==='"'?zt:At):s===zt||s===At?s=q:s===Et||s===Tt?s=ne:(s=q,o=void 0);let g=s===q&&r[n+1].startsWith("/>")?" ":"";i+=s===ne?c+Lr:p>=0?(a.push(l),c.slice(0,p)+Ze+c.slice(p)+B+g):c+B+(p===-2?n:g)}return[Pt(r,i+(r[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),a]},de=class r{constructor({strings:e,_$litType$:t},a){let o;this.parts=[];let i=0,s=0,n=e.length-1,c=this.parts,[l,d]=Rt(e,t);if(this.el=r.createElement(l,a),G.currentNode=this.el.content,t===2||t===3){let p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(o=G.nextNode())!==null&&c.length<n;){if(o.nodeType===1){if(o.hasAttributes())for(let p of o.getAttributeNames())if(p.endsWith(Ze)){let h=d[s++],g=o.getAttribute(p).split(B),y=/([.?@])?(.*)/.exec(h);c.push({type:1,index:i,name:y[2],strings:g,ctor:y[1]==="."?Ce:y[1]==="?"?Ee:y[1]==="@"?Te:K}),o.removeAttribute(p)}else p.startsWith(B)&&(c.push({type:6,index:i}),o.removeAttribute(p));if(Lt.test(o.tagName)){let p=o.textContent.split(B),h=p.length-1;if(h>0){o.textContent=Se?Se.emptyScript:"";for(let g=0;g<h;g++)o.append(p[g],ce()),G.nextNode(),c.push({type:2,index:++i});o.append(p[h],ce())}}}else if(o.nodeType===8)if(o.data===Xe)c.push({type:2,index:i});else{let p=-1;for(;(p=o.data.indexOf(B,p+1))!==-1;)c.push({type:7,index:i}),p+=B.length-1}i++}}static createElement(e,t){let a=V.createElement("template");return a.innerHTML=e,a}};function J(r,e,t=r,a){if(e===T)return e;let o=a!==void 0?t._$Co?.[a]:t._$Cl,i=le(e)?void 0:e._$litDirective$;return o?.constructor!==i&&(o?._$AO?.(!1),i===void 0?o=void 0:(o=new i(r),o._$AT(r,t,a)),a!==void 0?(t._$Co??=[])[a]=o:t._$Cl=o),o!==void 0&&(e=J(r,o._$AS(r,e.values),o,a)),e}var $e=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:a}=this._$AD,o=(e?.creationScope??V).importNode(t,!0);G.currentNode=o;let i=G.nextNode(),s=0,n=0,c=a[0];for(;c!==void 0;){if(s===c.index){let l;c.type===2?l=new re(i,i.nextSibling,this,e):c.type===1?l=new c.ctor(i,c.name,c.strings,this,e):c.type===6&&(l=new Ae(i,this,e)),this._$AV.push(l),c=a[++n]}s!==c?.index&&(i=G.nextNode(),s++)}return G.currentNode=V,o}p(e){let t=0;for(let a of this._$AV)a!==void 0&&(a.strings!==void 0?(a._$AI(e,a,t),t+=a.strings.length-2):a._$AI(e[t])),t++}},re=class r{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,a,o){this.type=2,this._$AH=k,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=a,this.options=o,this._$Cv=o?.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=J(this,e,t),le(e)?e===k||e==null||e===""?(this._$AH!==k&&this._$AR(),this._$AH=k):e!==this._$AH&&e!==T&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Mt(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!==k&&le(this._$AH)?this._$AA.nextSibling.data=e:this.T(V.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:a}=e,o=typeof a=="number"?this._$AC(e):(a.el===void 0&&(a.el=de.createElement(Pt(a.h,a.h[0]),this.options)),a);if(this._$AH?._$AD===o)this._$AH.p(t);else{let i=new $e(o,this),s=i.u(this.options);i.p(t),this.T(s),this._$AH=i}}_$AC(e){let t=_t.get(e.strings);return t===void 0&&_t.set(e.strings,t=new de(e)),t}k(e){et(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,a,o=0;for(let i of e)o===t.length?t.push(a=new r(this.O(ce()),this.O(ce()),this,this.options)):a=t[o],a._$AI(i),o++;o<t.length&&(this._$AR(a&&a._$AB.nextSibling,o),t.length=o)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let a=e.nextSibling;e.remove(),e=a}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},K=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,a,o,i){this.type=1,this._$AH=k,this._$AN=void 0,this.element=e,this.name=t,this._$AM=o,this.options=i,a.length>2||a[0]!==""||a[1]!==""?(this._$AH=Array(a.length-1).fill(new String),this.strings=a):this._$AH=k}_$AI(e,t=this,a,o){let i=this.strings,s=!1;if(i===void 0)e=J(this,e,t,0),s=!le(e)||e!==this._$AH&&e!==T,s&&(this._$AH=e);else{let n=e,c,l;for(e=i[0],c=0;c<i.length-1;c++)l=J(this,n[a+c],t,c),l===T&&(l=this._$AH[c]),s||=!le(l)||l!==this._$AH[c],l===k?e=k:e!==k&&(e+=(l??"")+i[c+1]),this._$AH[c]=l}s&&!o&&this.j(e)}j(e){e===k?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Ce=class extends K{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===k?void 0:e}},Ee=class extends K{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==k)}},Te=class extends K{constructor(e,t,a,o,i){super(e,t,a,o,i),this.type=5}_$AI(e,t=this){if((e=J(this,e,t,0)??k)===T)return;let a=this._$AH,o=e===k&&a!==k||e.capture!==a.capture||e.once!==a.once||e.passive!==a.passive,i=e!==k&&(a===k||o);o&&this.element.removeEventListener(this.name,this,a),i&&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)}},Ae=class{constructor(e,t,a){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=a}get _$AU(){return this._$AM._$AU}_$AI(e){J(this,e)}},Ft={M:Ze,P:B,A:Xe,C:1,L:Rt,R:$e,D:Mt,V:J,I:re,H:K,N:Ee,U:Te,B:Ce,F:Ae},Dr=Ye.litHtmlPolyfillSupport;Dr?.(de,re),(Ye.litHtmlVersions??=[]).push("3.3.1");var j=(r,e,t)=>{let a=t?.renderBefore??e,o=a._$litPart$;if(o===void 0){let i=t?.renderBefore??null;a._$litPart$=o=new re(e.insertBefore(ce(),i),i,void 0,t??{})}return o._$AI(r),o};var ot=globalThis,R=class extends N{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=j(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return T}};R._$litElement$=!0,R.finalized=!0,ot.litElementHydrateSupport?.({LitElement:R});var Pr=ot.litElementPolyfillSupport;Pr?.({LitElement:R});(ot.litElementVersions??=[]).push("4.2.1");var H={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},z=r=>(...e)=>({_$litDirective$:r,values:e}),L=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,a){this._$Ct=e,this._$AM=t,this._$Ci=a}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};var{I:Rr}=Ft,Nt=r=>r===null||typeof r!="object"&&typeof r!="function";var Bt=r=>r.strings===void 0,It=()=>document.createComment(""),oe=(r,e,t)=>{let a=r._$AA.parentNode,o=e===void 0?r._$AB:e._$AA;if(t===void 0){let i=a.insertBefore(It(),o),s=a.insertBefore(It(),o);t=new Rr(i,s,r,r.options)}else{let i=t._$AB.nextSibling,s=t._$AM,n=s!==r;if(n){let c;t._$AQ?.(r),t._$AM=r,t._$AP!==void 0&&(c=r._$AU)!==s._$AU&&t._$AP(c)}if(i!==o||n){let c=t._$AA;for(;c!==i;){let l=c.nextSibling;a.insertBefore(c,o),c=l}}}return t},U=(r,e,t=r)=>(r._$AI(e,t),r),Fr={},_e=(r,e=Fr)=>r._$AH=e,Ot=r=>r._$AH,Me=r=>{r._$AR(),r._$AA.remove()};var jt=(r,e,t)=>{let a=new Map;for(let o=e;o<=t;o++)a.set(r[o],o);return a},Bo=z(class extends L{constructor(r){if(super(r),r.type!==H.CHILD)throw Error("repeat() can only be used in text expressions")}dt(r,e,t){let a;t===void 0?t=e:e!==void 0&&(a=e);let o=[],i=[],s=0;for(let n of r)o[s]=a?a(n,s):s,i[s]=t(n,s),s++;return{values:i,keys:o}}render(r,e,t){return this.dt(r,e,t).values}update(r,[e,t,a]){let o=Ot(r),{values:i,keys:s}=this.dt(e,t,a);if(!Array.isArray(o))return this.ut=s,i;let n=this.ut??=[],c=[],l,d,p=0,h=o.length-1,g=0,y=i.length-1;for(;p<=h&&g<=y;)if(o[p]===null)p++;else if(o[h]===null)h--;else if(n[p]===s[g])c[g]=U(o[p],i[g]),p++,g++;else if(n[h]===s[y])c[y]=U(o[h],i[y]),h--,y--;else if(n[p]===s[y])c[y]=U(o[p],i[y]),oe(r,c[y+1],o[p]),p++,y--;else if(n[h]===s[g])c[g]=U(o[h],i[g]),oe(r,o[p],o[h]),h--,g++;else if(l===void 0&&(l=jt(s,g,y),d=jt(n,p,h)),l.has(n[p]))if(l.has(n[h])){let f=d.get(s[g]),b=f!==void 0?o[f]:null;if(b===null){let _=oe(r,o[p]);U(_,i[g]),c[g]=_}else c[g]=U(b,i[g]),oe(r,o[p],b),o[f]=null;g++}else Me(o[h]),h--;else Me(o[p]),p++;for(;g<=y;){let f=oe(r,c[y+1]);U(f,i[g]),c[g++]=f}for(;p<=h;){let f=o[p++];f!==null&&Me(f)}return this.ut=s,_e(r,c),T}});var Vo=z(class extends L{constructor(){super(...arguments),this.key=k}render(r,e){return this.key=r,e}update(r,[e,t]){return e!==this.key&&(_e(r),this.key=e),t}});var ea=z(class extends L{constructor(r){if(super(r),r.type!==H.ATTRIBUTE||r.name!=="class"||r.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(r){return" "+Object.keys(r).filter(e=>r[e]).join(" ")+" "}update(r,[e]){if(this.st===void 0){this.st=new Set,r.strings!==void 0&&(this.nt=new Set(r.strings.join(" ").split(/\s/).filter(a=>a!=="")));for(let a in e)e[a]&&!this.nt?.has(a)&&this.st.add(a);return this.render(e)}let t=r.element.classList;for(let a of this.st)a in e||(t.remove(a),this.st.delete(a));for(let a in e){let o=!!e[a];o===this.st.has(a)||this.nt?.has(a)||(o?(t.add(a),this.st.add(a)):(t.remove(a),this.st.delete(a)))}return T}});var pe=(r,e)=>{let t=r._$AN;if(t===void 0)return!1;for(let a of t)a._$AO?.(e,!1),pe(a,e);return!0},Le=r=>{let e,t;do{if((e=r._$AM)===void 0)break;t=e._$AN,t.delete(r),r=e}while(t?.size===0)},Ht=r=>{for(let e;e=r._$AM;r=e){let t=e._$AN;if(t===void 0)e._$AN=t=new Set;else if(t.has(r))break;t.add(r),Br(e)}};function Ir(r){this._$AN!==void 0?(Le(this),this._$AM=r,Ht(this)):this._$AM=r}function Nr(r,e=!1,t=0){let a=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(e)if(Array.isArray(a))for(let i=t;i<a.length;i++)pe(a[i],!1),Le(a[i]);else a!=null&&(pe(a,!1),Le(a));else pe(this,r)}var Br=r=>{r.type==H.CHILD&&(r._$AP??=Nr,r._$AQ??=Ir)},ae=class extends L{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,a){super._$AT(e,t,a),Ht(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(pe(this,e),Le(this))}setValue(e){if(Bt(this._$Ct))this._$Ct._$AI(e,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};var at=new WeakMap,Or=z(class extends ae{render(r){return k}update(r,[e]){let t=e!==this.G;return t&&this.G!==void 0&&this.rt(void 0),(t||this.lt!==this.ct)&&(this.G=e,this.ht=r.options?.host,this.rt(this.ct=r.element)),k}rt(r){if(this.isConnected||(r=void 0),typeof this.G=="function"){let e=this.ht??globalThis,t=at.get(e);t===void 0&&(t=new WeakMap,at.set(e,t)),t.get(this.G)!==void 0&&this.G.call(this.ht,void 0),t.set(this.G,r),r!==void 0&&this.G.call(this.ht,r)}else this.G.value=r}get lt(){return typeof this.G=="function"?at.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var De=class{constructor(e){this.G=e}disconnect(){this.G=void 0}reconnect(e){this.G=e}deref(){return this.G}},Pe=class{constructor(){this.Y=void 0,this.Z=void 0}get(){return this.Y}pause(){this.Y??=new Promise(e=>this.Z=e)}resume(){this.Z?.(),this.Y=this.Z=void 0}};var Ut=r=>!Nt(r)&&typeof r.then=="function",Wt=1073741823,it=class extends ae{constructor(){super(...arguments),this._$Cwt=Wt,this._$Cbt=[],this._$CK=new De(this),this._$CX=new Pe}render(...e){return e.find(t=>!Ut(t))??T}update(e,t){let a=this._$Cbt,o=a.length;this._$Cbt=t;let i=this._$CK,s=this._$CX;this.isConnected||this.disconnected();for(let n=0;n<t.length&&!(n>this._$Cwt);n++){let c=t[n];if(!Ut(c))return this._$Cwt=n,c;n<o&&c===a[n]||(this._$Cwt=Wt,o=0,Promise.resolve(c).then(async l=>{for(;s.get();)await s.get();let d=i.deref();if(d!==void 0){let p=d._$Cbt.indexOf(c);p>-1&&p<d._$Cwt&&(d._$Cwt=p,d.setValue(l))}}))}return T}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}},jr=z(it);var Q=class extends L{constructor(e){if(super(e),this.it=k,e.type!==H.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===k||e==null)return this._t=void 0,this.it=e;if(e===T)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;let t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};Q.directiveName="unsafeHTML",Q.resultType=1;var Re=z(Q);var ue=class extends Q{};ue.directiveName="unsafeSVG",ue.resultType=2;var Hr=z(ue);var Ba=["127.0.0.1","localhost"].includes(window.location.hostname);var Ur=Symbol.for(""),Wr=r=>{if(r?.r===Ur)return r?._$litStatic$};var qt=new Map,st=r=>(e,...t)=>{let a=t.length,o,i,s=[],n=[],c,l=0,d=!1;for(;l<a;){for(c=e[l];l<a&&(i=t[l],(o=Wr(i))!==void 0);)c+=o+e[++l],d=!0;l!==a&&n.push(i),s.push(c),l++}if(l===a&&s.push(e[a]),d){let p=s.join("$$lit$$");(e=qt.get(p))===void 0&&(s.raw=s,qt.set(p,e=s)),t=n}return r(e,...t)},qr=st(ze),Ha=st(rt),Ua=st(Dt);var S=ze;var nt=class{constructor(){this._mode="static",this._staticPaths={tokens:"/assets/pds/styles/pds-tokens.css.js",primitives:"/assets/pds/styles/pds-primitives.css.js",components:"/assets/pds/styles/pds-components.css.js",utilities:"/assets/pds/styles/pds-utilities.css.js",styles:"/assets/pds/styles/pds-styles.css.js"}}setLiveMode(){this._mode="live"}setStaticMode(e={}){this._mode="static",this._staticPaths={...this._staticPaths,...e},console.log("[PDS Registry] Switched to STATIC mode",this._staticPaths)}async getStylesheet(e){if(this._mode==="live")return null;try{return(await import(this._staticPaths[e]))[e]}catch(t){console.error(`[PDS Registry] Failed to load static ${e}:`,t),console.error(`[PDS Registry] Looking for: ${this._staticPaths[e]}`),console.error("[PDS Registry] Make sure you've run 'npm run pds:export' and configured PDS.start() with the correct static.root path");let a=new CSSStyleSheet;return a.replaceSync("/* Failed to load "+e+" */"),a}}get mode(){return this._mode}get isLive(){return this._mode==="live"}},he=new nt;var u={FontWeights:{light:300,normal:400,medium:500,semibold:600,bold:700},LineHeights:{tight:1.25,normal:1.5,relaxed:1.75},BorderWidths:{hairline:.5,thin:1,medium:2,thick:3},RadiusSizes:{none:0,small:4,medium:8,large:16,xlarge:24,xxlarge:32},ShadowDepths:{none:"none",light:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",medium:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",deep:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",extreme:"0 25px 50px -12px rgba(0, 0, 0, 0.25)"},TransitionSpeeds:{fast:150,normal:250,slow:350},AnimationEasings:{linear:"linear",ease:"ease","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out",bounce:"cubic-bezier(0.68, -0.55, 0.265, 1.55)"},TouchTargetSizes:{compact:36,standard:44,comfortable:48,spacious:56},LinkStyles:{inline:"inline",block:"block",button:"button"},FocusStyles:{ring:"ring",outline:"outline",border:"border",glow:"glow"},TabSizes:{compact:2,standard:4,wide:8},SelectIcons:{chevron:"chevron",arrow:"arrow",caret:"caret",none:"none"}};var Fe={meta:{name:"Pure Design System Ontology",version:"1.0.0",description:"Complete metadata registry for PDS primitives, components, utilities, and tokens"},tokens:{colors:{semantic:["primary","secondary","accent","success","warning","danger","info"],neutral:["gray"],shades:[50,100,200,300,400,500,600,700,800,900,950],surface:["base","subtle","elevated","sunken","overlay","inverse","translucent"],text:["default","muted","subtle","inverse","primary","success","warning","danger","info"]},spacing:{scale:["1","2","3","4","5","6","8","10","12","16","20","24"],semantic:["xs","sm","md","lg","xl"]},typography:{families:["heading","body","mono"],sizes:["xs","sm","base","lg","xl","2xl","3xl","4xl","5xl"],weights:["light","normal","medium","semibold","bold"]},radius:{scale:["none","sm","base","md","lg","xl","2xl","full"]},shadows:{scale:["none","sm","base","md","lg","xl","inner"]},themes:["light","dark"],breakpoints:{sm:640,md:768,lg:1024,xl:1280}},primitives:[{id:"badge",name:"Badge / Pill",description:"Inline status indicators and labels",selectors:[".badge",".badge-primary",".badge-secondary",".badge-success",".badge-info",".badge-warning",".badge-danger",".badge-outline",".badge-sm",".badge-lg",".pill",".tag",".chip"],tags:["status","label","indicator","inline"],category:"feedback"},{id:"card",name:"Card",description:"Content container with padding, border-radius, and optional shadow",selectors:[".card",".card-basic",".card-elevated",".card-outlined",".card-interactive"],tags:["container","content","grouping"],category:"container"},{id:"surface",name:"Surface",description:"Smart surface classes with automatic text/background color handling",selectors:[".surface-base",".surface-subtle",".surface-elevated",".surface-sunken",".surface-overlay",".surface-inverse",".surface-translucent",".surface-translucent-25",".surface-translucent-50",".surface-translucent-75",".surface-primary",".surface-secondary",".surface-success",".surface-warning",".surface-danger",".surface-info"],tags:["background","theming","color","container"],category:"theming"},{id:"alert",name:"Alert",description:"Contextual feedback messages",selectors:[".alert",".alert-info",".alert-success",".alert-warning",".alert-danger",".alert-error",".alert-dismissible",".semantic-message"],tags:["feedback","message","notification","status"],category:"feedback"},{id:"dialog",name:"Dialog",description:"Modal dialog element",selectors:["dialog",".dialog"],tags:["modal","overlay","popup","modal"],category:"overlay"},{id:"divider",name:"Divider",description:"Horizontal rule with optional label",selectors:["hr","hr[data-content]"],tags:["separator","line","content-divider"],category:"layout"},{id:"table",name:"Table",description:"Data tables with responsive and styling variants",selectors:["table",".table-responsive",".table-striped",".table-bordered",".table-compact",".data-table"],tags:["data","grid","tabular","responsive"],category:"data"},{id:"button",name:"Button",description:"Interactive button element with variants",selectors:["button",".btn-primary",".btn-secondary",".btn-outline",".btn-sm",".btn-xs",".btn-lg",".btn-working",".icon-only"],tags:["interactive","action","cta","form"],category:"action"},{id:"fieldset",name:"Fieldset Group",description:"Form field grouping for radio/checkbox groups",selectors:["fieldset[role='group']","fieldset[role='radiogroup']","fieldset.buttons"],tags:["form","grouping","radio","checkbox"],category:"form"},{id:"label-field",name:"Label+Input",description:"Semantic label wrapping form input",selectors:["label","label:has(input)","label:has(select)","label:has(textarea)"],tags:["form","input","accessibility"],category:"form"},{id:"accordion",name:"Accordion",description:"Collapsible content sections",selectors:[".accordion",".accordion-item","details","details > summary"],tags:["expandable","collapsible","disclosure"],category:"disclosure"},{id:"icon",name:"Icon",description:"SVG icon element with size and color variants",selectors:["pds-icon",".icon-xs",".icon-sm",".icon-md",".icon-lg",".icon-xl",".icon-primary",".icon-secondary",".icon-accent",".icon-success",".icon-warning",".icon-danger",".icon-info",".icon-muted",".icon-subtle",".icon-text",".icon-text-start",".icon-text-end"],tags:["graphic","symbol","visual"],category:"media"},{id:"figure",name:"Figure/Media",description:"Figure element for images with captions",selectors:["figure","figure.media","figcaption"],tags:["image","media","caption"],category:"media"},{id:"gallery",name:"Gallery",description:"Image gallery grid",selectors:[".gallery",".gallery-grid",".img-gallery"],tags:["images","grid","collection"],category:"media"},{id:"form",name:"Form Container",description:"Form styling and layout",selectors:["form",".form-container",".form-actions",".field-description"],tags:["form","input","submission"],category:"form"},{id:"navigation",name:"Navigation",description:"Navigation elements and menus",selectors:["nav","nav[data-dropdown]","menu","nav menu li"],tags:["menu","links","routing"],category:"navigation"}],components:[{id:"pds-tabstrip",name:"Tab Strip",description:"Tabbed interface component",selectors:["pds-tabstrip"],tags:["tabs","navigation","panels"],category:"navigation"},{id:"pds-drawer",name:"Drawer",description:"Slide-out panel overlay",selectors:["pds-drawer"],tags:["panel","overlay","sidebar"],category:"overlay"},{id:"pds-upload",name:"Upload",description:"File upload component with drag-and-drop",selectors:["pds-upload"],tags:["file","upload","drag-drop","form"],category:"form"},{id:"pds-icon",name:"Icon",description:"SVG icon web component",selectors:["pds-icon"],tags:["icon","graphic","svg"],category:"media"},{id:"pds-toaster",name:"Toaster",description:"Toast notification container",selectors:["pds-toaster"],tags:["notification","toast","feedback"],category:"feedback"},{id:"pds-jsonform",name:"JSON Form",description:"Auto-generated form from JSON Schema",selectors:["pds-jsonform"],tags:["form","schema","auto-generate"],category:"form"},{id:"pds-splitpanel",name:"Split Panel",description:"Resizable split pane layout",selectors:["pds-splitpanel"],tags:["layout","resize","panels"],category:"layout"},{id:"pds-scrollrow",name:"Scroll Row",description:"Horizontal scrolling row with snap points",selectors:["pds-scrollrow"],tags:["scroll","horizontal","carousel"],category:"layout"},{id:"pds-richtext",name:"Rich Text",description:"Rich text editor component",selectors:["pds-richtext"],tags:["editor","wysiwyg","text"],category:"form"},{id:"pds-calendar",name:"Calendar",description:"Date picker calendar component",selectors:["pds-calendar"],tags:["date","picker","calendar"],category:"form"}],layoutPatterns:[{id:"container",name:"Container",description:"Centered max-width wrapper with padding",selectors:[".container"],tags:["wrapper","centered","max-width","page"],category:"structure"},{id:"grid",name:"Grid",description:"CSS Grid layout container",selectors:[".grid"],tags:["layout","columns","css-grid"],category:"layout"},{id:"grid-cols",name:"Grid Columns",description:"Fixed column count grids",selectors:[".grid-cols-1",".grid-cols-2",".grid-cols-3",".grid-cols-4",".grid-cols-6"],tags:["columns","fixed","grid"],category:"layout"},{id:"grid-auto",name:"Auto-fit Grid",description:"Responsive auto-fit grid with minimum widths",selectors:[".grid-auto-sm",".grid-auto-md",".grid-auto-lg",".grid-auto-xl"],tags:["responsive","auto-fit","fluid"],category:"layout"},{id:"flex",name:"Flex Container",description:"Flexbox layout with direction and wrap modifiers",selectors:[".flex",".flex-wrap",".flex-col",".flex-row"],tags:["flexbox","layout","alignment"],category:"layout"},{id:"grow",name:"Flex Grow",description:"Fill remaining flex space",selectors:[".grow"],tags:["flex","expand","fill"],category:"layout"},{id:"stack",name:"Stack",description:"Vertical flex layout with predefined gaps",selectors:[".stack-sm",".stack-md",".stack-lg",".stack-xl"],tags:["vertical","spacing","column"],category:"layout"},{id:"gap",name:"Gap",description:"Spacing between flex/grid children",selectors:[".gap-0",".gap-xs",".gap-sm",".gap-md",".gap-lg",".gap-xl"],tags:["spacing","margin","gutters"],category:"spacing"},{id:"items",name:"Items Alignment",description:"Cross-axis alignment for flex/grid",selectors:[".items-start",".items-center",".items-end",".items-stretch",".items-baseline"],tags:["alignment","vertical","cross-axis"],category:"alignment"},{id:"justify",name:"Justify Content",description:"Main-axis alignment for flex/grid",selectors:[".justify-start",".justify-center",".justify-end",".justify-between",".justify-around",".justify-evenly"],tags:["alignment","horizontal","main-axis"],category:"alignment"},{id:"max-width",name:"Max-Width",description:"Content width constraints",selectors:[".max-w-sm",".max-w-md",".max-w-lg",".max-w-xl"],tags:["width","constraint","readable"],category:"sizing"},{id:"section",name:"Section Spacing",description:"Vertical padding for content sections",selectors:[".section",".section-lg"],tags:["spacing","vertical","padding"],category:"spacing"},{id:"mobile-stack",name:"Mobile Stack",description:"Stack on mobile, row on desktop",selectors:[".mobile-stack"],tags:["responsive","mobile","breakpoint"],category:"responsive"}],utilities:{text:{alignment:[".text-left",".text-center",".text-right"],color:[".text-muted"],overflow:[".truncate"]},backdrop:{base:[".backdrop"],variants:[".backdrop-light",".backdrop-dark"],blur:[".backdrop-blur-sm",".backdrop-blur-md",".backdrop-blur-lg"]},shadow:{scale:[".shadow-sm",".shadow-base",".shadow-md",".shadow-lg",".shadow-xl",".shadow-inner",".shadow-none"]},border:{gradient:[".border-gradient",".border-gradient-primary",".border-gradient-accent",".border-gradient-secondary",".border-gradient-soft",".border-gradient-medium",".border-gradient-strong"],glow:[".border-glow",".border-glow-sm",".border-glow-lg",".border-glow-primary",".border-glow-accent",".border-glow-success",".border-glow-warning",".border-glow-danger"],combined:[".border-gradient-glow"]},media:{image:[".img-gallery",".img-rounded-sm",".img-rounded-md",".img-rounded-lg",".img-rounded-xl",".img-rounded-full",".img-inline"],video:[".video-responsive"],figure:[".figure-responsive"]},effects:{glass:[".liquid-glass"]}},responsive:{prefixes:["sm","md","lg"],utilities:{grid:[":grid-cols-2",":grid-cols-3",":grid-cols-4"],flex:[":flex-row"],text:[":text-sm",":text-lg",":text-xl"],spacing:[":p-6",":p-8",":p-12",":gap-6",":gap-8",":gap-12"],width:[":w-1/2",":w-1/3",":w-1/4"],display:[":hidden",":block"]}},enhancements:[{id:"dropdown",selector:"nav[data-dropdown]",description:"Dropdown menu from nav element",tags:["menu","interactive","navigation"]},{id:"toggle",selector:"label[data-toggle]",description:"Toggle switch from checkbox",tags:["switch","boolean","form"]},{id:"range",selector:'input[type="range"]',description:"Enhanced range slider with output",tags:["slider","input","form"]},{id:"required",selector:"form [required]",description:"Required field asterisk indicator",tags:["validation","form","accessibility"]},{id:"open-group",selector:"fieldset[role=group][data-open]",description:"Editable checkbox/radio group",tags:["form","dynamic","editable"]},{id:"working-button",selector:"button.btn-working, a.btn-working",description:"Button with loading spinner",tags:["loading","async","feedback"]},{id:"labeled-divider",selector:"hr[data-content]",description:"Horizontal rule with centered label",tags:["divider","separator","text"]}],categories:{feedback:{description:"User feedback and status indicators",primitives:["alert","badge"],components:["pds-toaster"]},form:{description:"Form inputs and controls",primitives:["button","fieldset","label-field","form"],components:["pds-upload","pds-jsonform","pds-richtext","pds-calendar"]},layout:{description:"Page structure and content arrangement",patterns:["container","grid","flex","stack","section"],components:["pds-splitpanel","pds-scrollrow"]},navigation:{description:"Navigation and routing",primitives:["navigation"],components:["pds-tabstrip","pds-drawer"]},media:{description:"Images, icons, and visual content",primitives:["icon","figure","gallery"],components:["pds-icon"]},overlay:{description:"Modal and overlay content",primitives:["dialog"],components:["pds-drawer"]},data:{description:"Data display and tables",primitives:["table"]},theming:{description:"Colors, surfaces, and visual theming",primitives:["surface"]}},styles:{typography:["headings","body","code","links"],icons:{source:"svg",sets:["core","brand"]},interactive:["focus","hover","active","disabled"],states:["success","warning","danger","info","muted"]},searchRelations:{text:["typography","truncate","text-muted","text-primary","text-left","text-center","text-right","pds-richtext","heading","font","label","paragraph","content","ellipsis","overflow","input"],font:["typography","text","heading","font-size","font-weight","font-family"],type:["typography","text","font"],typography:["text","font","heading","truncate","text-muted"],heading:["typography","text","font-size","h1","h2","h3"],truncate:["text","overflow","ellipsis","clamp","nowrap","typography"],ellipsis:["truncate","text","overflow","clamp"],overflow:["truncate","scroll","hidden","text"],paragraph:["text","typography","content","body"],content:["text","typography","body","article"],form:["input","field","label","button","fieldset","pds-jsonform","pds-upload","pds-richtext","pds-calendar","required","validation","submit"],input:["form","field","text","label","required","validation"],field:["form","input","label","required"],button:["btn","interactive","action","submit","form","btn-primary","btn-secondary","btn-working"],btn:["button","interactive","action"],toggle:["switch","checkbox","boolean","form","interactive"],switch:["toggle","checkbox","boolean"],slider:["range","input","form"],range:["slider","input","form"],checkbox:["toggle","form","fieldset","boolean"],radio:["fieldset","form","group"],select:["dropdown","form","input","menu"],upload:["file","pds-upload","form","drag-drop"],file:["upload","pds-upload","form"],modal:["dialog","pds-ask","overlay","popup","backdrop","pds-drawer","alert","confirm","prompt","lightbox"],dialog:["modal","pds-ask","overlay","popup","backdrop","alert","confirm","prompt"],popup:["modal","dialog","dropdown","popover","overlay","tooltip"],popover:["popup","tooltip","overlay"],overlay:["modal","dialog","backdrop","drawer","popup"],drawer:["pds-drawer","sidebar","panel","overlay","modal"],backdrop:["overlay","modal","dialog","blur"],confirm:["pds-ask","dialog","modal"],prompt:["pds-ask","dialog","modal","input"],ask:["pds-ask","dialog","confirm","prompt","modal"],dropdown:["menu","nav-dropdown","select","popover"],menu:["dropdown","navigation","nav","list"],nav:["navigation","menu","dropdown","tabs","links"],navigation:["nav","menu","tabs","pds-tabstrip","links","routing"],tabs:["pds-tabstrip","navigation","panels"],tab:["tabs","pds-tabstrip","panel"],link:["navigation","anchor","href","routing"],alert:["notification","feedback","message","status","toast","modal","dialog","pds-ask","confirm","warning","error","info","success","danger"],notification:["alert","toast","pds-toaster","feedback","message","popup"],toast:["pds-toaster","notification","alert","feedback","popup","snackbar"],feedback:["alert","notification","toast","status","badge","validation","error","success"],message:["alert","notification","feedback","dialog","toast"],status:["badge","alert","indicator","feedback","state"],error:["alert","danger","validation","feedback","warning"],success:["alert","feedback","badge","status","check"],warning:["alert","caution","feedback","status"],info:["alert","information","feedback","status"],danger:["alert","error","feedback","destructive","delete"],badge:["status","pill","tag","chip","indicator","label"],pill:["badge","tag","chip"],tag:["badge","pill","chip","label"],chip:["badge","pill","tag"],layout:["grid","flex","stack","container","gap","spacing","pds-splitpanel","section"],grid:["layout","columns","css-grid","table","gallery"],flex:["layout","flexbox","alignment","row","column"],stack:["layout","vertical","spacing","column","gap"],container:["wrapper","layout","max-width","centered"],gap:["spacing","margin","padding","layout"],spacing:["gap","margin","padding","section"],section:["spacing","layout","container","page"],split:["pds-splitpanel","resizable","panels","layout"],panel:["pds-splitpanel","drawer","sidebar","section"],card:["surface","container","elevated","content"],surface:["card","background","elevated","theming","color"],box:["card","container","surface"],elevated:["surface","shadow","card"],color:["palette","theme","surface","primary","secondary","accent"],colours:["color","palette","theme"],palette:["color","theme","tokens"],theme:["color","palette","dark","light","surface"],primary:["color","button","badge","surface"],secondary:["color","button","badge","surface"],accent:["color","highlight","surface"],border:["border-gradient","border-glow","outline","radius"],effect:["border-gradient","border-glow","shadow","glass","animation"],gradient:["border-gradient","color","background"],glow:["border-glow","effect","shadow"],shadow:["elevated","effect","depth","card"],radius:["rounded","border","corner"],rounded:["radius","border","corner"],glass:["liquid-glass","backdrop","blur","effect"],icon:["pds-icon","graphic","symbol","svg","phosphor"],image:["img","figure","gallery","media","picture"],img:["image","figure","gallery","media"],figure:["image","media","caption"],gallery:["images","grid","collection","media"],media:["image","icon","figure","gallery","video"],table:["data","grid","tabular","rows","columns"],data:["table","json","form","display"],editor:["pds-richtext","wysiwyg","text","content"],wysiwyg:["editor","pds-richtext","richtext"],richtext:["pds-richtext","editor","wysiwyg","text"],calendar:["pds-calendar","date","picker","datepicker"],date:["calendar","pds-calendar","picker","input"],datepicker:["calendar","date","pds-calendar"],scroll:["pds-scrollrow","carousel","horizontal","overflow"],carousel:["scroll","pds-scrollrow","slider","gallery"],accordion:["details","collapsible","expandable","disclosure"],collapsible:["accordion","details","expandable"],expandable:["accordion","collapsible","disclosure"],details:["accordion","summary","disclosure"],divider:["hr","separator","line","rule"],separator:["divider","hr","line"],hr:["divider","separator","horizontal-rule"],interactive:["hover","focus","active","disabled","button","link"],hover:["interactive","effect","state"],focus:["interactive","accessibility","state","outline"],disabled:["interactive","state","muted"],loading:["btn-working","spinner","async","progress"],spinner:["loading","btn-working","progress"],accessibility:["a11y","aria","focus","label","required"],a11y:["accessibility","aria","semantic"],aria:["accessibility","a11y","role"],required:["form","validation","asterisk","input"],validation:["form","required","error","feedback"],start:["getting-started","intro","overview","whatispds"],intro:["getting-started","overview","start","docs"],getting:["getting-started","start","intro"],overview:["intro","start","summary","layout-overview"],docs:["documentation","reference","guide"],primitive:["primitives"],component:["components"],enhancement:["enhancements"],foundation:["foundations","color","icon","typography","spacing","tokens"],utility:["utilities","text","backdrop","shadow","border","helper"],pattern:["patterns","layout","responsive","mobile-stack"]}};function Y(r,e){if(!r||!e)return!1;try{return r.matches(e)}catch{return!1}}function Gt(r,e){if(!r||!e||!r.closest)return null;try{return r.closest(e)}catch{return null}}function Vt(r,{maxDepth:e=5}={}){if(!r||r.closest&&r.closest(".showcase-toc"))return null;let t=r,a=0;for(;t&&a<e;){if(a++,t.tagName==="DS-SHOWCASE")return null;if(t.classList&&t.classList.contains("showcase-section")){t=t.parentElement;continue}for(let i of PDS.ontology.enhancements){let s=i.selector||i;if(Y(t,s))return{element:t,componentType:"enhanced-component",displayName:i.description||s,id:i.id}}if(t.tagName==="FIELDSET"){let i=t.getAttribute("role");if(i==="group"||i==="radiogroup")return{element:t,componentType:"form-group",displayName:i==="radiogroup"?"radio group":"form group"}}if(t.tagName==="LABEL"&&t.querySelector&&t.querySelector("input,select,textarea"))return{element:t,componentType:"form-control",displayName:"label with input"};let o=t.closest?t.closest("label"):null;if(o&&o.querySelector&&o.querySelector("input,select,textarea"))return{element:o,componentType:"form-control",displayName:"label with input"};for(let i of PDS.ontology.primitives){for(let s of i.selectors||[]){let n=String(s||"").trim();if(n.includes("*")){if(n.startsWith(".")){let l=n.slice(1).replace(/\*/g,"");if(t.classList&&Array.from(t.classList).some(h=>h.startsWith(l)))return{element:t,componentType:"pds-primitive",displayName:i.name||i.id,id:i.id,tags:i.tags};let d=t.parentElement,p=0;for(;d&&p<e;){if(d.classList&&Array.from(d.classList).some(h=>h.startsWith(l))&&d.tagName!=="DS-SHOWCASE")return{element:d,componentType:"pds-primitive",displayName:i.name||i.id,id:i.id,tags:i.tags};d=d.parentElement,p++}continue}continue}if(Y(t,n))return{element:t,componentType:"pds-primitive",displayName:i.name||i.id,id:i.id,tags:i.tags};let c=Gt(t,n);if(c&&c.tagName!=="DS-SHOWCASE")return{element:c,componentType:"pds-primitive",displayName:i.name||i.id,id:i.id,tags:i.tags}}if(t.classList){let s=Array.from(t.classList);for(let n of i.selectors||[])if(typeof n=="string"&&n.includes("*")&&n.startsWith(".")){let c=n.slice(1).replace(/\*/g,"");if(s.some(l=>l.startsWith(c)))return{element:t,componentType:"pds-primitive",displayName:i.name||i.id,id:i.id,tags:i.tags}}}}for(let i of PDS.ontology.layoutPatterns||[])for(let s of i.selectors||[]){let n=String(s||"").trim();if(n.includes("*")){if(n.startsWith(".")){let l=n.slice(1).replace(/\*/g,"");if(t.classList&&Array.from(t.classList).some(d=>d.startsWith(l)))return{element:t,componentType:"layout-pattern",displayName:i.name||i.id,id:i.id,tags:i.tags}}continue}if(Y(t,n))return{element:t,componentType:"layout-pattern",displayName:i.name||i.id,id:i.id,tags:i.tags};let c=Gt(t,n);if(c&&c.tagName!=="DS-SHOWCASE")return{element:c,componentType:"layout-pattern",displayName:i.name||i.id,id:i.id,tags:i.tags}}if(t.tagName&&t.tagName.includes("-")){let i=t.tagName.toLowerCase(),s=PDS.ontology.components.find(n=>n.selectors.includes(i));return{element:t,componentType:"web-component",displayName:s?.name||i,id:s?.id||i,tags:s?.tags}}if(t.tagName==="BUTTON"){let i=t.querySelector&&t.querySelector("pds-icon");return{element:t,componentType:"button",displayName:i?"button with icon":"button",id:"button"}}if(Y(t,"pds-icon")||t.closest&&t.closest("pds-icon")){let i=Y(t,"pds-icon")?t:t.closest("pds-icon");return{element:i,componentType:"icon",displayName:`pds-icon (${i.getAttribute&&i.getAttribute("icon")||"unknown"})`,id:"pds-icon"}}if(Y(t,"nav[data-dropdown]")||t.closest&&t.closest("nav[data-dropdown]"))return{element:Y(t,"nav[data-dropdown]")?t:t.closest("nav[data-dropdown]"),componentType:"navigation",displayName:"dropdown menu",id:"dropdown"};t=t.parentElement}return null}var Jt=Fe;var $=class r{static#a;static get instance(){return this.#a}#e;#r;constructor(e={}){this.options={debug:!1,...e},this.options.design||(this.options.design={}),this.options.debug&&this.options.log?.("debug","Generator options:",this.options),r.#a=this,this.tokens=this.generateTokens(),this.options.debug&&this.options.log?.("debug","Generated tokens:",this.tokens),this.#fe(),typeof CSSStyleSheet<"u"?this.#xe():this.options.debug&&this.options.log?.("debug","[Generator] Skipping browser features (CSSStyleSheet not available)")}generateTokens(){let e=this.options.design||{};return{colors:this.#s(e.colors||{}),spacing:this.generateSpacingTokens(e.spatialRhythm||{}),radius:this.#_(e.shape||{}),borderWidths:this.#M(e.shape||{}),typography:this.generateTypographyTokens(e.typography||{}),shadows:this.#L(e.layers||{}),layout:this.#D(e.layout||{}),transitions:this.#P(e.behavior||{}),zIndex:this.#R(e.layers||{}),icons:this.#F(e.icons||{})}}#s(e){let{primary:t="#3b82f6",secondary:a="#64748b",accent:o="#ec4899",background:i="#ffffff",success:s=null,warning:n="#FFBF00",danger:c=null,info:l=null,darkMode:d={}}=e,p={primary:this.#o(t),secondary:this.#o(a),accent:this.#o(o),success:this.#o(s||this.#w(t)),warning:this.#o(n||o),danger:this.#o(c||this.#x(t)),info:this.#o(l||t),gray:this.#u(a),surface:this.#h(i)};return p.surface.fieldset=this.#k(p.surface),p.surfaceSmart=this.#y(p.surface),p.dark=this.#$(p,i,d),p.dark&&p.dark.surface&&(p.dark.surfaceSmart=this.#y(p.dark.surface)),p.interactive={light:{fill:this.#b(p.primary,4.5),text:p.primary[600]},dark:{fill:this.#b(p.dark.primary,4.5),text:this.#A(p.dark.primary,p.dark.surface.base,4.5)}},p}#o(e){let t=this.#i(e);return{50:this.#t(t.h,Math.max(t.s-10,10),Math.min(t.l+45,95)),100:this.#t(t.h,Math.max(t.s-5,15),Math.min(t.l+35,90)),200:this.#t(t.h,t.s,Math.min(t.l+25,85)),300:this.#t(t.h,t.s,Math.min(t.l+15,75)),400:this.#t(t.h,t.s,Math.min(t.l+5,65)),500:e,600:this.#t(t.h,t.s,Math.max(t.l-10,25)),700:this.#t(t.h,t.s,Math.max(t.l-20,20)),800:this.#t(t.h,t.s,Math.max(t.l-30,15)),900:this.#t(t.h,t.s,Math.max(t.l-40,10))}}#w(e){let t=this.#i(e);return this.#t(120,Math.max(t.s,60),45)}#x(e){let t=this.#i(e);return this.#t(0,Math.max(t.s,70),50)}#u(e){let t=this.#i(e),a=t.h,o=Math.min(t.s,10);return{50:this.#t(a,o,98),100:this.#t(a,o,95),200:this.#t(a,o,88),300:this.#t(a,o,78),400:this.#t(a,o,60),500:e,600:this.#t(a,Math.min(o+5,15),45),700:this.#t(a,Math.min(o+8,18),35),800:this.#t(a,Math.min(o+10,20),20),900:this.#t(a,Math.min(o+12,22),10)}}#h(e){let t=this.#i(e);return{base:e,subtle:this.#t(t.h,Math.max(t.s,2),Math.max(t.l-2,2)),elevated:this.#t(t.h,Math.max(t.s,3),Math.max(t.l-4,5)),sunken:this.#t(t.h,Math.max(t.s,4),Math.max(t.l-6,8)),overlay:this.#t(t.h,Math.max(t.s,2),Math.min(t.l+2,98)),inverse:this.#g(e),hover:"color-mix(in oklab, var(--color-surface-base) 92%, var(--color-text-primary) 8%);"}}#k(e){return{base:e.subtle,subtle:e.elevated,elevated:e.sunken,sunken:this.#S(e.sunken,.05),overlay:e.elevated}}#S(e,t=.05){let a=this.#i(e),o=Math.max(a.l-a.l*t,5);return this.#t(a.h,a.s,o)}#g(e){let t=this.#i(e);if(t.l>50){let a=Math.min(t.s+5,25),o=Math.max(12-(t.l-50)*.1,8);return this.#t(t.h,a,o)}else{let a=Math.max(t.s-10,5),o=Math.min(85+(50-t.l)*.3,95);return this.#t(t.h,a,o)}}#$(e,t="#ffffff",a={}){let o=a.background?a.background:this.#g(t),i=this.#h(o),s=a.primary?this.#o(a.primary):this.#n(e.primary);return{surface:{...i,fieldset:this.#T(i)},primary:s,secondary:a.secondary?this.#o(a.secondary):this.#n(e.secondary),accent:a.accent?this.#o(a.accent):this.#n(e.accent),gray:a.secondary?this.#u(a.secondary):e.gray,success:this.#n(e.success),info:this.#n(e.info),warning:this.#n(e.warning),danger:this.#n(e.danger)}}#l(e){let t=String(e||"").replace("#",""),a=t.length===3?t.split("").map(i=>i+i).join(""):t,o=parseInt(a,16);return{r:o>>16&255,g:o>>8&255,b:o&255}}#p(e){let{r:t,g:a,b:o}=this.#l(e),i=[t/255,a/255,o/255].map(s=>s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4));return .2126*i[0]+.7152*i[1]+.0722*i[2]}#d(e,t){let a=this.#p(e),o=this.#p(t),i=Math.max(a,o),s=Math.min(a,o);return(i+.05)/(s+.05)}#m(e,t=4.5){if(!e)return"#000000";let a="#ffffff",o="#000000",i=this.#d(e,a);if(i>=t)return a;let s=this.#d(e,o);return s>=t||s>i?o:a}#f(e,t=1){let{r:a,g:o,b:i}=this.#l(e);return`rgba(${a}, ${o}, ${i}, ${t})`}#C(e,t,a=.5){let o=this.#l(e),i=this.#l(t),s=Math.round(o.r+(i.r-o.r)*a),n=Math.round(o.g+(i.g-o.g)*a),c=Math.round(o.b+(i.b-o.b)*a);return this.#E(s,n,c)}#E(e,t,a){let o=i=>{let s=Math.max(0,Math.min(255,Math.round(i))).toString(16);return s.length===1?"0"+s:s};return`#${o(e)}${o(t)}${o(a)}`}#T(e){return{base:e.elevated,subtle:e.overlay,elevated:this.#v(e.elevated,.08),sunken:e.elevated,overlay:this.#v(e.overlay,.05)}}#A(e={},t="#000000",a=4.5){let o=["600","700","800","500","400","900","300","200"],i={shade:null,color:null,ratio:0};for(let s of o){let n=e?.[s];if(!n||typeof n!="string")continue;let c=this.#d(n,t);if(c>i.ratio&&(i={shade:s,color:n,ratio:c}),c>=a)return n}return i.color||e?.["600"]||e?.["500"]}#b(e={},t=4.5){let a=["600","700","800","500","400","900"],o={shade:null,color:null,ratio:0};for(let i of a){let s=e?.[i];if(!s||typeof s!="string")continue;let n=this.#d(s,"#ffffff");if(n>o.ratio&&(o={shade:i,color:s,ratio:n}),n>=t)return s}return o.color||e?.["600"]||e?.["500"]}#y(e){let t={};return Object.entries(e).forEach(([a,o])=>{if(!o||typeof o!="string"||!o.startsWith("#"))return;let i=this.#p(o)<.5,s=this.#m(o,4.5),n=this.#m(o,3),c=this.#C(s,o,.4),l=s,d=c,p=i?"#ffffff":"#000000",h=i?.25:.1,g=this.#f(p,h),y=i?"#ffffff":"#000000",f=i?.15:.1,b=this.#f(y,f);t[a]={bg:o,text:s,textSecondary:n,textMuted:c,icon:l,iconSubtle:d,shadow:g,border:b,scheme:i?"dark":"light"}}),t}#v(e,t=.05){let a=this.#i(e),o=Math.min(a.l+(100-a.l)*t,95);return this.#t(a.h,a.s,o)}#n(e){let t={};return Object.entries({50:{source:"900",dimFactor:.8},100:{source:"800",dimFactor:.8},200:{source:"700",dimFactor:.8},300:{source:"600",dimFactor:.8},400:{source:"500",dimFactor:.85},500:{source:"400",dimFactor:.85},600:{source:"300",dimFactor:.85},700:{source:"200",dimFactor:.85},800:{source:"100",dimFactor:.95},900:{source:"50",dimFactor:.95}}).forEach(([o,i])=>{let s=e[i.source];t[o]=this.#z(s,i.dimFactor)}),t}#z(e,t=.8){let a=this.#i(e),o=Math.max(a.s*t,5),i=Math.max(a.l*t,5);return this.#t(a.h,o,i)}generateSpacingTokens(e){let{baseUnit:t=4,scaleRatio:a=1.25,maxSpacingSteps:o=12}=e,i=Number.isFinite(Number(t))?Number(t):4,s=Math.min(Number.isFinite(Number(o))?Number(o):12,12),n={0:"0"};for(let c=1;c<=s;c++)n[c]=`${i*c}px`;return n}#_(e){let{radiusSize:t="medium",customRadius:a=null}=e,o;a!=null?o=a:typeof t=="number"?o=t:typeof t=="string"?o=u.RadiusSizes[t]??u.RadiusSizes.medium:o=u.RadiusSizes.medium;let i=Number.isFinite(Number(o))?Number(o):u.RadiusSizes.medium;return{none:"0",xs:`${Number.isFinite(i*.25)?Math.round(i*.25):0}px`,sm:`${Number.isFinite(i*.5)?Math.round(i*.5):0}px`,md:`${i}px`,lg:`${Number.isFinite(i*1.5)?Math.round(i*1.5):0}px`,xl:`${Number.isFinite(i*2)?Math.round(i*2):0}px`,full:"9999px"}}#M(e){let{borderWidth:t="medium"}=e,a;return typeof t=="number"?a=t:typeof t=="string"?a=u.BorderWidths[t]??u.BorderWidths.medium:a=u.BorderWidths.medium,{hairline:`${u.BorderWidths.hairline}px`,thin:`${u.BorderWidths.thin}px`,medium:`${u.BorderWidths.medium}px`,thick:`${u.BorderWidths.thick}px`}}generateTypographyTokens(e){let{fontFamilyHeadings:t="system-ui, -apple-system, sans-serif",fontFamilyBody:a="system-ui, -apple-system, sans-serif",fontFamilyMono:o='ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace',baseFontSize:i=16,fontScale:s=1.25,fontWeightLight:n=u.FontWeights.light,fontWeightNormal:c=u.FontWeights.normal,fontWeightMedium:l=u.FontWeights.medium,fontWeightSemibold:d=u.FontWeights.semibold,fontWeightBold:p=u.FontWeights.bold,lineHeightTight:h=u.LineHeights.tight,lineHeightNormal:g=u.LineHeights.normal,lineHeightRelaxed:y=u.LineHeights.relaxed}=e,f=Number.isFinite(Number(i))?Number(i):16,b=Number.isFinite(Number(s))?Number(s):1.25;return{fontFamily:{headings:t,body:a,mono:o},fontSize:{xs:`${Math.round(f/Math.pow(b,2))}px`,sm:`${Math.round(f/b)}px`,base:`${f}px`,lg:`${Math.round(f*b)}px`,xl:`${Math.round(f*Math.pow(b,2))}px`,"2xl":`${Math.round(f*Math.pow(b,3))}px`,"3xl":`${Math.round(f*Math.pow(b,4))}px`,"4xl":`${Math.round(f*Math.pow(b,5))}px`},fontWeight:{light:n?.toString()||"300",normal:c?.toString()||"400",medium:l?.toString()||"500",semibold:d?.toString()||"600",bold:p?.toString()||"700"},lineHeight:{tight:h?.toString()||"1.25",normal:g?.toString()||"1.5",relaxed:y?.toString()||"1.75"}}}#L(e){let{baseShadowOpacity:t=.1,shadowBlurMultiplier:a=1,shadowOffsetMultiplier:o=1}=e,i=`rgba(0, 0, 0, ${t})`,s=`rgba(0, 0, 0, ${t*.5})`;return{sm:`0 ${1*o}px ${2*a}px 0 ${s}`,base:`0 ${1*o}px ${3*a}px 0 ${i}, 0 ${1*o}px ${2*a}px 0 ${s}`,md:`0 ${4*o}px ${6*a}px ${-1*o}px ${i}, 0 ${2*o}px ${4*a}px ${-1*o}px ${s}`,lg:`0 ${10*o}px ${15*a}px ${-3*o}px ${i}, 0 ${4*o}px ${6*a}px ${-2*o}px ${s}`,xl:`0 ${20*o}px ${25*a}px ${-5*o}px ${i}, 0 ${10*o}px ${10*a}px ${-5*o}px ${s}`,inner:`inset 0 ${2*o}px ${4*a}px 0 ${s}`}}#D(e){let{maxWidth:t=1200,containerPadding:a=16,breakpoints:o={sm:640,md:768,lg:1024,xl:1280}}=e;return{maxWidth:`${t}px`,minHeight:"100vh",containerPadding:`${a}px`,breakpoints:{sm:`${o.sm}px`,md:`${o.md}px`,lg:`${o.lg}px`,xl:`${o.xl}px`},pageMargin:"120px",sectionGap:"160px",containerGap:"200px",heroSpacing:"240px",footerSpacing:"160px"}}#P(e){let{transitionSpeed:t=u.TransitionSpeeds.normal,animationEasing:a=u.AnimationEasings["ease-out"]}=e,o;return typeof t=="number"?o=t:typeof t=="string"&&u.TransitionSpeeds[t]?o=u.TransitionSpeeds[t]:o=u.TransitionSpeeds.normal,{fast:`${Math.round(o*.6)}ms`,normal:`${o}ms`,slow:`${Math.round(o*1.4)}ms`}}#R(e){let{baseZIndex:t=1e3,zIndexStep:a=10}=e;return{dropdown:t.toString(),sticky:(t+a*2).toString(),fixed:(t+a*3).toString(),modal:(t+a*4).toString(),drawer:(t+a*5).toString(),popover:(t+a*6).toString(),tooltip:(t+a*7).toString(),notification:(t+a*8).toString()}}#F(e){let{set:t="phosphor",weight:a="regular",defaultSize:o=24,sizes:i={xs:16,sm:20,md:24,lg:32,xl:48,"2xl":64},spritePath:s="/assets/pds/icons/pds-icons.svg",externalPath:n="/assets/img/icons/"}=e;return{set:t,weight:a,defaultSize:`${o}px`,sizes:Object.fromEntries(Object.entries(i).map(([c,l])=>[c,`${l}px`])),spritePath:s,externalPath:n}}#I(e){let t=[];t.push(` /* Colors */
3
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),At=/'/g,zt=/"/g,Lt=/^(?:script|style|textarea|title)$/i,tt=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),ze=tt(1),rt=tt(2),Dt=tt(3),T=Symbol.for("lit-noChange"),k=Symbol.for("lit-nothing"),_t=new WeakMap,G=V.createTreeWalker(V,129);function Pt(r,e){if(!et(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ct!==void 0?Ct.createHTML(e):e}var Rt=(r,e)=>{let t=r.length-1,a=[],o,i=e===2?"<svg>":e===3?"<math>":"",s=ne;for(let n=0;n<t;n++){let c=r[n],l,d,p=-1,h=0;for(;h<c.length&&(s.lastIndex=h,d=s.exec(c),d!==null);)h=s.lastIndex,s===ne?d[1]==="!--"?s=Et:d[1]!==void 0?s=Tt:d[2]!==void 0?(Lt.test(d[2])&&(o=RegExp("</"+d[2],"g")),s=q):d[3]!==void 0&&(s=q):s===q?d[0]===">"?(s=o??ne,p=-1):d[1]===void 0?p=-2:(p=s.lastIndex-d[2].length,l=d[1],s=d[3]===void 0?q:d[3]==='"'?zt:At):s===zt||s===At?s=q:s===Et||s===Tt?s=ne:(s=q,o=void 0);let g=s===q&&r[n+1].startsWith("/>")?" ":"";i+=s===ne?c+Lr:p>=0?(a.push(l),c.slice(0,p)+Ze+c.slice(p)+B+g):c+B+(p===-2?n:g)}return[Pt(r,i+(r[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),a]},de=class r{constructor({strings:e,_$litType$:t},a){let o;this.parts=[];let i=0,s=0,n=e.length-1,c=this.parts,[l,d]=Rt(e,t);if(this.el=r.createElement(l,a),G.currentNode=this.el.content,t===2||t===3){let p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(o=G.nextNode())!==null&&c.length<n;){if(o.nodeType===1){if(o.hasAttributes())for(let p of o.getAttributeNames())if(p.endsWith(Ze)){let h=d[s++],g=o.getAttribute(p).split(B),y=/([.?@])?(.*)/.exec(h);c.push({type:1,index:i,name:y[2],strings:g,ctor:y[1]==="."?Ce:y[1]==="?"?Ee:y[1]==="@"?Te:K}),o.removeAttribute(p)}else p.startsWith(B)&&(c.push({type:6,index:i}),o.removeAttribute(p));if(Lt.test(o.tagName)){let p=o.textContent.split(B),h=p.length-1;if(h>0){o.textContent=Se?Se.emptyScript:"";for(let g=0;g<h;g++)o.append(p[g],ce()),G.nextNode(),c.push({type:2,index:++i});o.append(p[h],ce())}}}else if(o.nodeType===8)if(o.data===Xe)c.push({type:2,index:i});else{let p=-1;for(;(p=o.data.indexOf(B,p+1))!==-1;)c.push({type:7,index:i}),p+=B.length-1}i++}}static createElement(e,t){let a=V.createElement("template");return a.innerHTML=e,a}};function J(r,e,t=r,a){if(e===T)return e;let o=a!==void 0?t._$Co?.[a]:t._$Cl,i=le(e)?void 0:e._$litDirective$;return o?.constructor!==i&&(o?._$AO?.(!1),i===void 0?o=void 0:(o=new i(r),o._$AT(r,t,a)),a!==void 0?(t._$Co??=[])[a]=o:t._$Cl=o),o!==void 0&&(e=J(r,o._$AS(r,e.values),o,a)),e}var $e=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:a}=this._$AD,o=(e?.creationScope??V).importNode(t,!0);G.currentNode=o;let i=G.nextNode(),s=0,n=0,c=a[0];for(;c!==void 0;){if(s===c.index){let l;c.type===2?l=new re(i,i.nextSibling,this,e):c.type===1?l=new c.ctor(i,c.name,c.strings,this,e):c.type===6&&(l=new Ae(i,this,e)),this._$AV.push(l),c=a[++n]}s!==c?.index&&(i=G.nextNode(),s++)}return G.currentNode=V,o}p(e){let t=0;for(let a of this._$AV)a!==void 0&&(a.strings!==void 0?(a._$AI(e,a,t),t+=a.strings.length-2):a._$AI(e[t])),t++}},re=class r{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,a,o){this.type=2,this._$AH=k,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=a,this.options=o,this._$Cv=o?.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=J(this,e,t),le(e)?e===k||e==null||e===""?(this._$AH!==k&&this._$AR(),this._$AH=k):e!==this._$AH&&e!==T&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Mt(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!==k&&le(this._$AH)?this._$AA.nextSibling.data=e:this.T(V.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:a}=e,o=typeof a=="number"?this._$AC(e):(a.el===void 0&&(a.el=de.createElement(Pt(a.h,a.h[0]),this.options)),a);if(this._$AH?._$AD===o)this._$AH.p(t);else{let i=new $e(o,this),s=i.u(this.options);i.p(t),this.T(s),this._$AH=i}}_$AC(e){let t=_t.get(e.strings);return t===void 0&&_t.set(e.strings,t=new de(e)),t}k(e){et(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,a,o=0;for(let i of e)o===t.length?t.push(a=new r(this.O(ce()),this.O(ce()),this,this.options)):a=t[o],a._$AI(i),o++;o<t.length&&(this._$AR(a&&a._$AB.nextSibling,o),t.length=o)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let a=e.nextSibling;e.remove(),e=a}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},K=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,a,o,i){this.type=1,this._$AH=k,this._$AN=void 0,this.element=e,this.name=t,this._$AM=o,this.options=i,a.length>2||a[0]!==""||a[1]!==""?(this._$AH=Array(a.length-1).fill(new String),this.strings=a):this._$AH=k}_$AI(e,t=this,a,o){let i=this.strings,s=!1;if(i===void 0)e=J(this,e,t,0),s=!le(e)||e!==this._$AH&&e!==T,s&&(this._$AH=e);else{let n=e,c,l;for(e=i[0],c=0;c<i.length-1;c++)l=J(this,n[a+c],t,c),l===T&&(l=this._$AH[c]),s||=!le(l)||l!==this._$AH[c],l===k?e=k:e!==k&&(e+=(l??"")+i[c+1]),this._$AH[c]=l}s&&!o&&this.j(e)}j(e){e===k?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Ce=class extends K{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===k?void 0:e}},Ee=class extends K{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==k)}},Te=class extends K{constructor(e,t,a,o,i){super(e,t,a,o,i),this.type=5}_$AI(e,t=this){if((e=J(this,e,t,0)??k)===T)return;let a=this._$AH,o=e===k&&a!==k||e.capture!==a.capture||e.once!==a.once||e.passive!==a.passive,i=e!==k&&(a===k||o);o&&this.element.removeEventListener(this.name,this,a),i&&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)}},Ae=class{constructor(e,t,a){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=a}get _$AU(){return this._$AM._$AU}_$AI(e){J(this,e)}},Ft={M:Ze,P:B,A:Xe,C:1,L:Rt,R:$e,D:Mt,V:J,I:re,H:K,N:Ee,U:Te,B:Ce,F:Ae},Dr=Ye.litHtmlPolyfillSupport;Dr?.(de,re),(Ye.litHtmlVersions??=[]).push("3.3.1");var j=(r,e,t)=>{let a=t?.renderBefore??e,o=a._$litPart$;if(o===void 0){let i=t?.renderBefore??null;a._$litPart$=o=new re(e.insertBefore(ce(),i),i,void 0,t??{})}return o._$AI(r),o};var ot=globalThis,R=class extends N{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=j(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return T}};R._$litElement$=!0,R.finalized=!0,ot.litElementHydrateSupport?.({LitElement:R});var Pr=ot.litElementPolyfillSupport;Pr?.({LitElement:R});(ot.litElementVersions??=[]).push("4.2.1");var H={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},z=r=>(...e)=>({_$litDirective$:r,values:e}),L=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,a){this._$Ct=e,this._$AM=t,this._$Ci=a}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};var{I:Rr}=Ft,Nt=r=>r===null||typeof r!="object"&&typeof r!="function";var Bt=r=>r.strings===void 0,It=()=>document.createComment(""),oe=(r,e,t)=>{let a=r._$AA.parentNode,o=e===void 0?r._$AB:e._$AA;if(t===void 0){let i=a.insertBefore(It(),o),s=a.insertBefore(It(),o);t=new Rr(i,s,r,r.options)}else{let i=t._$AB.nextSibling,s=t._$AM,n=s!==r;if(n){let c;t._$AQ?.(r),t._$AM=r,t._$AP!==void 0&&(c=r._$AU)!==s._$AU&&t._$AP(c)}if(i!==o||n){let c=t._$AA;for(;c!==i;){let l=c.nextSibling;a.insertBefore(c,o),c=l}}}return t},U=(r,e,t=r)=>(r._$AI(e,t),r),Fr={},_e=(r,e=Fr)=>r._$AH=e,Ot=r=>r._$AH,Me=r=>{r._$AR(),r._$AA.remove()};var jt=(r,e,t)=>{let a=new Map;for(let o=e;o<=t;o++)a.set(r[o],o);return a},Bo=z(class extends L{constructor(r){if(super(r),r.type!==H.CHILD)throw Error("repeat() can only be used in text expressions")}dt(r,e,t){let a;t===void 0?t=e:e!==void 0&&(a=e);let o=[],i=[],s=0;for(let n of r)o[s]=a?a(n,s):s,i[s]=t(n,s),s++;return{values:i,keys:o}}render(r,e,t){return this.dt(r,e,t).values}update(r,[e,t,a]){let o=Ot(r),{values:i,keys:s}=this.dt(e,t,a);if(!Array.isArray(o))return this.ut=s,i;let n=this.ut??=[],c=[],l,d,p=0,h=o.length-1,g=0,y=i.length-1;for(;p<=h&&g<=y;)if(o[p]===null)p++;else if(o[h]===null)h--;else if(n[p]===s[g])c[g]=U(o[p],i[g]),p++,g++;else if(n[h]===s[y])c[y]=U(o[h],i[y]),h--,y--;else if(n[p]===s[y])c[y]=U(o[p],i[y]),oe(r,c[y+1],o[p]),p++,y--;else if(n[h]===s[g])c[g]=U(o[h],i[g]),oe(r,o[p],o[h]),h--,g++;else if(l===void 0&&(l=jt(s,g,y),d=jt(n,p,h)),l.has(n[p]))if(l.has(n[h])){let f=d.get(s[g]),b=f!==void 0?o[f]:null;if(b===null){let _=oe(r,o[p]);U(_,i[g]),c[g]=_}else c[g]=U(b,i[g]),oe(r,o[p],b),o[f]=null;g++}else Me(o[h]),h--;else Me(o[p]),p++;for(;g<=y;){let f=oe(r,c[y+1]);U(f,i[g]),c[g++]=f}for(;p<=h;){let f=o[p++];f!==null&&Me(f)}return this.ut=s,_e(r,c),T}});var Vo=z(class extends L{constructor(){super(...arguments),this.key=k}render(r,e){return this.key=r,e}update(r,[e,t]){return e!==this.key&&(_e(r),this.key=e),t}});var ea=z(class extends L{constructor(r){if(super(r),r.type!==H.ATTRIBUTE||r.name!=="class"||r.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(r){return" "+Object.keys(r).filter(e=>r[e]).join(" ")+" "}update(r,[e]){if(this.st===void 0){this.st=new Set,r.strings!==void 0&&(this.nt=new Set(r.strings.join(" ").split(/\s/).filter(a=>a!=="")));for(let a in e)e[a]&&!this.nt?.has(a)&&this.st.add(a);return this.render(e)}let t=r.element.classList;for(let a of this.st)a in e||(t.remove(a),this.st.delete(a));for(let a in e){let o=!!e[a];o===this.st.has(a)||this.nt?.has(a)||(o?(t.add(a),this.st.add(a)):(t.remove(a),this.st.delete(a)))}return T}});var pe=(r,e)=>{let t=r._$AN;if(t===void 0)return!1;for(let a of t)a._$AO?.(e,!1),pe(a,e);return!0},Le=r=>{let e,t;do{if((e=r._$AM)===void 0)break;t=e._$AN,t.delete(r),r=e}while(t?.size===0)},Ht=r=>{for(let e;e=r._$AM;r=e){let t=e._$AN;if(t===void 0)e._$AN=t=new Set;else if(t.has(r))break;t.add(r),Br(e)}};function Ir(r){this._$AN!==void 0?(Le(this),this._$AM=r,Ht(this)):this._$AM=r}function Nr(r,e=!1,t=0){let a=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(e)if(Array.isArray(a))for(let i=t;i<a.length;i++)pe(a[i],!1),Le(a[i]);else a!=null&&(pe(a,!1),Le(a));else pe(this,r)}var Br=r=>{r.type==H.CHILD&&(r._$AP??=Nr,r._$AQ??=Ir)},ae=class extends L{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,a){super._$AT(e,t,a),Ht(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(pe(this,e),Le(this))}setValue(e){if(Bt(this._$Ct))this._$Ct._$AI(e,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};var at=new WeakMap,Or=z(class extends ae{render(r){return k}update(r,[e]){let t=e!==this.G;return t&&this.G!==void 0&&this.rt(void 0),(t||this.lt!==this.ct)&&(this.G=e,this.ht=r.options?.host,this.rt(this.ct=r.element)),k}rt(r){if(this.isConnected||(r=void 0),typeof this.G=="function"){let e=this.ht??globalThis,t=at.get(e);t===void 0&&(t=new WeakMap,at.set(e,t)),t.get(this.G)!==void 0&&this.G.call(this.ht,void 0),t.set(this.G,r),r!==void 0&&this.G.call(this.ht,r)}else this.G.value=r}get lt(){return typeof this.G=="function"?at.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var De=class{constructor(e){this.G=e}disconnect(){this.G=void 0}reconnect(e){this.G=e}deref(){return this.G}},Pe=class{constructor(){this.Y=void 0,this.Z=void 0}get(){return this.Y}pause(){this.Y??=new Promise(e=>this.Z=e)}resume(){this.Z?.(),this.Y=this.Z=void 0}};var Ut=r=>!Nt(r)&&typeof r.then=="function",Wt=1073741823,it=class extends ae{constructor(){super(...arguments),this._$Cwt=Wt,this._$Cbt=[],this._$CK=new De(this),this._$CX=new Pe}render(...e){return e.find(t=>!Ut(t))??T}update(e,t){let a=this._$Cbt,o=a.length;this._$Cbt=t;let i=this._$CK,s=this._$CX;this.isConnected||this.disconnected();for(let n=0;n<t.length&&!(n>this._$Cwt);n++){let c=t[n];if(!Ut(c))return this._$Cwt=n,c;n<o&&c===a[n]||(this._$Cwt=Wt,o=0,Promise.resolve(c).then(async l=>{for(;s.get();)await s.get();let d=i.deref();if(d!==void 0){let p=d._$Cbt.indexOf(c);p>-1&&p<d._$Cwt&&(d._$Cwt=p,d.setValue(l))}}))}return T}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}},jr=z(it);var Q=class extends L{constructor(e){if(super(e),this.it=k,e.type!==H.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===k||e==null)return this._t=void 0,this.it=e;if(e===T)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;let t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};Q.directiveName="unsafeHTML",Q.resultType=1;var Re=z(Q);var ue=class extends Q{};ue.directiveName="unsafeSVG",ue.resultType=2;var Hr=z(ue);var Ba=["127.0.0.1","localhost"].includes(window.location.hostname);var Ur=Symbol.for(""),Wr=r=>{if(r?.r===Ur)return r?._$litStatic$};var qt=new Map,st=r=>(e,...t)=>{let a=t.length,o,i,s=[],n=[],c,l=0,d=!1;for(;l<a;){for(c=e[l];l<a&&(i=t[l],(o=Wr(i))!==void 0);)c+=o+e[++l],d=!0;l!==a&&n.push(i),s.push(c),l++}if(l===a&&s.push(e[a]),d){let p=s.join("$$lit$$");(e=qt.get(p))===void 0&&(s.raw=s,qt.set(p,e=s)),t=n}return r(e,...t)},qr=st(ze),Ha=st(rt),Ua=st(Dt);var S=ze;var nt=class{constructor(){this._mode="static",this._staticPaths={tokens:"/assets/pds/styles/pds-tokens.css.js",primitives:"/assets/pds/styles/pds-primitives.css.js",components:"/assets/pds/styles/pds-components.css.js",utilities:"/assets/pds/styles/pds-utilities.css.js",styles:"/assets/pds/styles/pds-styles.css.js"}}setLiveMode(){this._mode="live"}setStaticMode(e={}){this._mode="static",this._staticPaths={...this._staticPaths,...e},console.log("[PDS Registry] Switched to STATIC mode",this._staticPaths)}async getStylesheet(e){if(this._mode==="live")return null;try{return(await import(this._staticPaths[e]))[e]}catch(t){console.error(`[PDS Registry] Failed to load static ${e}:`,t),console.error(`[PDS Registry] Looking for: ${this._staticPaths[e]}`),console.error("[PDS Registry] Make sure you've run 'npm run pds:export' and configured PDS.start() with the correct static.root path");let a=new CSSStyleSheet;return a.replaceSync("/* Failed to load "+e+" */"),a}}get mode(){return this._mode}get isLive(){return this._mode==="live"}},he=new nt;var u={FontWeights:{light:300,normal:400,medium:500,semibold:600,bold:700},LineHeights:{tight:1.25,normal:1.5,relaxed:1.75},BorderWidths:{hairline:.5,thin:1,medium:2,thick:3},RadiusSizes:{none:0,small:4,medium:8,large:16,xlarge:24,xxlarge:32},ShadowDepths:{none:"none",light:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",medium:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",deep:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",extreme:"0 25px 50px -12px rgba(0, 0, 0, 0.25)"},TransitionSpeeds:{fast:150,normal:250,slow:350},AnimationEasings:{linear:"linear",ease:"ease","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out",bounce:"cubic-bezier(0.68, -0.55, 0.265, 1.55)"},TouchTargetSizes:{compact:36,standard:44,comfortable:48,spacious:56},LinkStyles:{inline:"inline",block:"block",button:"button"},FocusStyles:{ring:"ring",outline:"outline",border:"border",glow:"glow"},TabSizes:{compact:2,standard:4,wide:8},SelectIcons:{chevron:"chevron",arrow:"arrow",caret:"caret",none:"none"}};var Fe={meta:{name:"Pure Design System Ontology",version:"1.0.0",description:"Complete metadata registry for PDS primitives, components, utilities, and tokens"},tokens:{colors:{semantic:["primary","secondary","accent","success","warning","danger","info"],neutral:["gray"],shades:[50,100,200,300,400,500,600,700,800,900,950],surface:["base","subtle","elevated","sunken","overlay","inverse","translucent"],text:["default","muted","subtle","inverse","primary","success","warning","danger","info"]},spacing:{scale:["1","2","3","4","5","6","8","10","12","16","20","24"],semantic:["xs","sm","md","lg","xl"]},typography:{families:["heading","body","mono"],sizes:["xs","sm","base","lg","xl","2xl","3xl","4xl","5xl"],weights:["light","normal","medium","semibold","bold"]},radius:{scale:["none","sm","base","md","lg","xl","2xl","full"]},shadows:{scale:["none","sm","base","md","lg","xl","inner"]},themes:["light","dark"],breakpoints:{sm:640,md:768,lg:1024,xl:1280}},primitives:[{id:"badge",name:"Badge / Pill",description:"Inline status indicators and labels",selectors:[".badge",".badge-primary",".badge-secondary",".badge-success",".badge-info",".badge-warning",".badge-danger",".badge-outline",".badge-sm",".badge-lg",".pill",".tag",".chip"],tags:["status","label","indicator","inline"],category:"feedback"},{id:"card",name:"Card",description:"Content container with padding, border-radius, and optional shadow",selectors:[".card",".card-basic",".card-elevated",".card-outlined",".card-interactive"],tags:["container","content","grouping"],category:"container"},{id:"surface",name:"Surface",description:"Smart surface classes with automatic text/background color handling",selectors:[".surface-base",".surface-subtle",".surface-elevated",".surface-sunken",".surface-overlay",".surface-inverse",".surface-translucent",".surface-translucent-25",".surface-translucent-50",".surface-translucent-75",".surface-primary",".surface-secondary",".surface-success",".surface-warning",".surface-danger",".surface-info"],tags:["background","theming","color","container"],category:"theming"},{id:"alert",name:"Alert",description:"Contextual feedback messages",selectors:[".alert",".alert-info",".alert-success",".alert-warning",".alert-danger",".alert-error",".alert-dismissible",".semantic-message"],tags:["feedback","message","notification","status"],category:"feedback"},{id:"dialog",name:"Dialog",description:"Modal dialog element",selectors:["dialog",".dialog"],tags:["modal","overlay","popup","modal"],category:"overlay"},{id:"divider",name:"Divider",description:"Horizontal rule with optional label",selectors:["hr","hr[data-content]"],tags:["separator","line","content-divider"],category:"layout"},{id:"table",name:"Table",description:"Data tables with responsive and styling variants",selectors:["table",".table-responsive",".table-striped",".table-bordered",".table-compact",".data-table"],tags:["data","grid","tabular","responsive"],category:"data"},{id:"button",name:"Button",description:"Interactive button element with variants",selectors:["button",".btn-primary",".btn-secondary",".btn-outline",".btn-sm",".btn-xs",".btn-lg",".btn-working",".icon-only"],tags:["interactive","action","cta","form"],category:"action"},{id:"fieldset",name:"Fieldset Group",description:"Form field grouping for radio/checkbox groups",selectors:["fieldset[role='group']","fieldset[role='radiogroup']","fieldset.buttons"],tags:["form","grouping","radio","checkbox"],category:"form"},{id:"label-field",name:"Label+Input",description:"Semantic label wrapping form input",selectors:["label","label:has(input)","label:has(select)","label:has(textarea)"],tags:["form","input","accessibility"],category:"form"},{id:"accordion",name:"Accordion",description:"Collapsible content sections",selectors:[".accordion",".accordion-item","details","details > summary"],tags:["expandable","collapsible","disclosure"],category:"disclosure"},{id:"icon",name:"Icon",description:"SVG icon element with size and color variants",selectors:["pds-icon",".icon-xs",".icon-sm",".icon-md",".icon-lg",".icon-xl",".icon-primary",".icon-secondary",".icon-accent",".icon-success",".icon-warning",".icon-danger",".icon-info",".icon-muted",".icon-subtle",".icon-text",".icon-text-start",".icon-text-end"],tags:["graphic","symbol","visual"],category:"media"},{id:"figure",name:"Figure/Media",description:"Figure element for images with captions",selectors:["figure","figure.media","figcaption"],tags:["image","media","caption"],category:"media"},{id:"gallery",name:"Gallery",description:"Image gallery grid",selectors:[".gallery",".gallery-grid",".img-gallery"],tags:["images","grid","collection"],category:"media"},{id:"form",name:"Form Container",description:"Form styling and layout",selectors:["form",".form-container",".form-actions",".field-description"],tags:["form","input","submission"],category:"form"},{id:"navigation",name:"Navigation",description:"Navigation elements and menus",selectors:["nav","nav[data-dropdown]","menu","nav menu li"],tags:["menu","links","routing"],category:"navigation"}],components:[{id:"pds-tabstrip",name:"Tab Strip",description:"Tabbed interface component",selectors:["pds-tabstrip"],tags:["tabs","navigation","panels"],category:"navigation"},{id:"pds-drawer",name:"Drawer",description:"Slide-out panel overlay",selectors:["pds-drawer"],tags:["panel","overlay","sidebar"],category:"overlay"},{id:"pds-upload",name:"Upload",description:"File upload component with drag-and-drop",selectors:["pds-upload"],tags:["file","upload","drag-drop","form"],category:"form"},{id:"pds-icon",name:"Icon",description:"SVG icon web component",selectors:["pds-icon"],tags:["icon","graphic","svg"],category:"media"},{id:"pds-toaster",name:"Toaster",description:"Toast notification container",selectors:["pds-toaster"],tags:["notification","toast","feedback"],category:"feedback"},{id:"pds-form",name:"JSON Form",description:"Auto-generated form from JSON Schema",selectors:["pds-form"],tags:["form","schema","auto-generate"],category:"form"},{id:"pds-splitpanel",name:"Split Panel",description:"Resizable split pane layout",selectors:["pds-splitpanel"],tags:["layout","resize","panels"],category:"layout"},{id:"pds-scrollrow",name:"Scroll Row",description:"Horizontal scrolling row with snap points",selectors:["pds-scrollrow"],tags:["scroll","horizontal","carousel"],category:"layout"},{id:"pds-richtext",name:"Rich Text",description:"Rich text editor component",selectors:["pds-richtext"],tags:["editor","wysiwyg","text"],category:"form"},{id:"pds-calendar",name:"Calendar",description:"Date picker calendar component",selectors:["pds-calendar"],tags:["date","picker","calendar"],category:"form"}],layoutPatterns:[{id:"container",name:"Container",description:"Centered max-width wrapper with padding",selectors:[".container"],tags:["wrapper","centered","max-width","page"],category:"structure"},{id:"grid",name:"Grid",description:"CSS Grid layout container",selectors:[".grid"],tags:["layout","columns","css-grid"],category:"layout"},{id:"grid-cols",name:"Grid Columns",description:"Fixed column count grids",selectors:[".grid-cols-1",".grid-cols-2",".grid-cols-3",".grid-cols-4",".grid-cols-6"],tags:["columns","fixed","grid"],category:"layout"},{id:"grid-auto",name:"Auto-fit Grid",description:"Responsive auto-fit grid with minimum widths",selectors:[".grid-auto-sm",".grid-auto-md",".grid-auto-lg",".grid-auto-xl"],tags:["responsive","auto-fit","fluid"],category:"layout"},{id:"flex",name:"Flex Container",description:"Flexbox layout with direction and wrap modifiers",selectors:[".flex",".flex-wrap",".flex-col",".flex-row"],tags:["flexbox","layout","alignment"],category:"layout"},{id:"grow",name:"Flex Grow",description:"Fill remaining flex space",selectors:[".grow"],tags:["flex","expand","fill"],category:"layout"},{id:"stack",name:"Stack",description:"Vertical flex layout with predefined gaps",selectors:[".stack-sm",".stack-md",".stack-lg",".stack-xl"],tags:["vertical","spacing","column"],category:"layout"},{id:"gap",name:"Gap",description:"Spacing between flex/grid children",selectors:[".gap-0",".gap-xs",".gap-sm",".gap-md",".gap-lg",".gap-xl"],tags:["spacing","margin","gutters"],category:"spacing"},{id:"items",name:"Items Alignment",description:"Cross-axis alignment for flex/grid",selectors:[".items-start",".items-center",".items-end",".items-stretch",".items-baseline"],tags:["alignment","vertical","cross-axis"],category:"alignment"},{id:"justify",name:"Justify Content",description:"Main-axis alignment for flex/grid",selectors:[".justify-start",".justify-center",".justify-end",".justify-between",".justify-around",".justify-evenly"],tags:["alignment","horizontal","main-axis"],category:"alignment"},{id:"max-width",name:"Max-Width",description:"Content width constraints",selectors:[".max-w-sm",".max-w-md",".max-w-lg",".max-w-xl"],tags:["width","constraint","readable"],category:"sizing"},{id:"section",name:"Section Spacing",description:"Vertical padding for content sections",selectors:[".section",".section-lg"],tags:["spacing","vertical","padding"],category:"spacing"},{id:"mobile-stack",name:"Mobile Stack",description:"Stack on mobile, row on desktop",selectors:[".mobile-stack"],tags:["responsive","mobile","breakpoint"],category:"responsive"}],utilities:{text:{alignment:[".text-left",".text-center",".text-right"],color:[".text-muted"],overflow:[".truncate"]},backdrop:{base:[".backdrop"],variants:[".backdrop-light",".backdrop-dark"],blur:[".backdrop-blur-sm",".backdrop-blur-md",".backdrop-blur-lg"]},shadow:{scale:[".shadow-sm",".shadow-base",".shadow-md",".shadow-lg",".shadow-xl",".shadow-inner",".shadow-none"]},border:{gradient:[".border-gradient",".border-gradient-primary",".border-gradient-accent",".border-gradient-secondary",".border-gradient-soft",".border-gradient-medium",".border-gradient-strong"],glow:[".border-glow",".border-glow-sm",".border-glow-lg",".border-glow-primary",".border-glow-accent",".border-glow-success",".border-glow-warning",".border-glow-danger"],combined:[".border-gradient-glow"]},media:{image:[".img-gallery",".img-rounded-sm",".img-rounded-md",".img-rounded-lg",".img-rounded-xl",".img-rounded-full",".img-inline"],video:[".video-responsive"],figure:[".figure-responsive"]},effects:{glass:[".liquid-glass"]}},responsive:{prefixes:["sm","md","lg"],utilities:{grid:[":grid-cols-2",":grid-cols-3",":grid-cols-4"],flex:[":flex-row"],text:[":text-sm",":text-lg",":text-xl"],spacing:[":p-6",":p-8",":p-12",":gap-6",":gap-8",":gap-12"],width:[":w-1/2",":w-1/3",":w-1/4"],display:[":hidden",":block"]}},enhancements:[{id:"dropdown",selector:"nav[data-dropdown]",description:"Dropdown menu from nav element",tags:["menu","interactive","navigation"]},{id:"toggle",selector:"label[data-toggle]",description:"Toggle switch from checkbox",tags:["switch","boolean","form"]},{id:"range",selector:'input[type="range"]',description:"Enhanced range slider with output",tags:["slider","input","form"]},{id:"required",selector:"form [required]",description:"Required field asterisk indicator",tags:["validation","form","accessibility"]},{id:"open-group",selector:"fieldset[role=group][data-open]",description:"Editable checkbox/radio group",tags:["form","dynamic","editable"]},{id:"working-button",selector:"button.btn-working, a.btn-working",description:"Button with loading spinner",tags:["loading","async","feedback"]},{id:"labeled-divider",selector:"hr[data-content]",description:"Horizontal rule with centered label",tags:["divider","separator","text"]}],categories:{feedback:{description:"User feedback and status indicators",primitives:["alert","badge"],components:["pds-toaster"]},form:{description:"Form inputs and controls",primitives:["button","fieldset","label-field","form"],components:["pds-upload","pds-form","pds-richtext","pds-calendar"]},layout:{description:"Page structure and content arrangement",patterns:["container","grid","flex","stack","section"],components:["pds-splitpanel","pds-scrollrow"]},navigation:{description:"Navigation and routing",primitives:["navigation"],components:["pds-tabstrip","pds-drawer"]},media:{description:"Images, icons, and visual content",primitives:["icon","figure","gallery"],components:["pds-icon"]},overlay:{description:"Modal and overlay content",primitives:["dialog"],components:["pds-drawer"]},data:{description:"Data display and tables",primitives:["table"]},theming:{description:"Colors, surfaces, and visual theming",primitives:["surface"]}},styles:{typography:["headings","body","code","links"],icons:{source:"svg",sets:["core","brand"]},interactive:["focus","hover","active","disabled"],states:["success","warning","danger","info","muted"]},searchRelations:{text:["typography","truncate","text-muted","text-primary","text-left","text-center","text-right","pds-richtext","heading","font","label","paragraph","content","ellipsis","overflow","input"],font:["typography","text","heading","font-size","font-weight","font-family"],type:["typography","text","font"],typography:["text","font","heading","truncate","text-muted"],heading:["typography","text","font-size","h1","h2","h3"],truncate:["text","overflow","ellipsis","clamp","nowrap","typography"],ellipsis:["truncate","text","overflow","clamp"],overflow:["truncate","scroll","hidden","text"],paragraph:["text","typography","content","body"],content:["text","typography","body","article"],form:["input","field","label","button","fieldset","pds-form","pds-upload","pds-richtext","pds-calendar","required","validation","submit"],input:["form","field","text","label","required","validation"],field:["form","input","label","required"],button:["btn","interactive","action","submit","form","btn-primary","btn-secondary","btn-working"],btn:["button","interactive","action"],toggle:["switch","checkbox","boolean","form","interactive"],switch:["toggle","checkbox","boolean"],slider:["range","input","form"],range:["slider","input","form"],checkbox:["toggle","form","fieldset","boolean"],radio:["fieldset","form","group"],select:["dropdown","form","input","menu"],upload:["file","pds-upload","form","drag-drop"],file:["upload","pds-upload","form"],modal:["dialog","pds-ask","overlay","popup","backdrop","pds-drawer","alert","confirm","prompt","lightbox"],dialog:["modal","pds-ask","overlay","popup","backdrop","alert","confirm","prompt"],popup:["modal","dialog","dropdown","popover","overlay","tooltip"],popover:["popup","tooltip","overlay"],overlay:["modal","dialog","backdrop","drawer","popup"],drawer:["pds-drawer","sidebar","panel","overlay","modal"],backdrop:["overlay","modal","dialog","blur"],confirm:["pds-ask","dialog","modal"],prompt:["pds-ask","dialog","modal","input"],ask:["pds-ask","dialog","confirm","prompt","modal"],dropdown:["menu","nav-dropdown","select","popover"],menu:["dropdown","navigation","nav","list"],nav:["navigation","menu","dropdown","tabs","links"],navigation:["nav","menu","tabs","pds-tabstrip","links","routing"],tabs:["pds-tabstrip","navigation","panels"],tab:["tabs","pds-tabstrip","panel"],link:["navigation","anchor","href","routing"],alert:["notification","feedback","message","status","toast","modal","dialog","pds-ask","confirm","warning","error","info","success","danger"],notification:["alert","toast","pds-toaster","feedback","message","popup"],toast:["pds-toaster","notification","alert","feedback","popup","snackbar"],feedback:["alert","notification","toast","status","badge","validation","error","success"],message:["alert","notification","feedback","dialog","toast"],status:["badge","alert","indicator","feedback","state"],error:["alert","danger","validation","feedback","warning"],success:["alert","feedback","badge","status","check"],warning:["alert","caution","feedback","status"],info:["alert","information","feedback","status"],danger:["alert","error","feedback","destructive","delete"],badge:["status","pill","tag","chip","indicator","label"],pill:["badge","tag","chip"],tag:["badge","pill","chip","label"],chip:["badge","pill","tag"],layout:["grid","flex","stack","container","gap","spacing","pds-splitpanel","section"],grid:["layout","columns","css-grid","table","gallery"],flex:["layout","flexbox","alignment","row","column"],stack:["layout","vertical","spacing","column","gap"],container:["wrapper","layout","max-width","centered"],gap:["spacing","margin","padding","layout"],spacing:["gap","margin","padding","section"],section:["spacing","layout","container","page"],split:["pds-splitpanel","resizable","panels","layout"],panel:["pds-splitpanel","drawer","sidebar","section"],card:["surface","container","elevated","content"],surface:["card","background","elevated","theming","color"],box:["card","container","surface"],elevated:["surface","shadow","card"],color:["palette","theme","surface","primary","secondary","accent"],colours:["color","palette","theme"],palette:["color","theme","tokens"],theme:["color","palette","dark","light","surface"],primary:["color","button","badge","surface"],secondary:["color","button","badge","surface"],accent:["color","highlight","surface"],border:["border-gradient","border-glow","outline","radius"],effect:["border-gradient","border-glow","shadow","glass","animation"],gradient:["border-gradient","color","background"],glow:["border-glow","effect","shadow"],shadow:["elevated","effect","depth","card"],radius:["rounded","border","corner"],rounded:["radius","border","corner"],glass:["liquid-glass","backdrop","blur","effect"],icon:["pds-icon","graphic","symbol","svg","phosphor"],image:["img","figure","gallery","media","picture"],img:["image","figure","gallery","media"],figure:["image","media","caption"],gallery:["images","grid","collection","media"],media:["image","icon","figure","gallery","video"],table:["data","grid","tabular","rows","columns"],data:["table","json","form","display"],editor:["pds-richtext","wysiwyg","text","content"],wysiwyg:["editor","pds-richtext","richtext"],richtext:["pds-richtext","editor","wysiwyg","text"],calendar:["pds-calendar","date","picker","datepicker"],date:["calendar","pds-calendar","picker","input"],datepicker:["calendar","date","pds-calendar"],scroll:["pds-scrollrow","carousel","horizontal","overflow"],carousel:["scroll","pds-scrollrow","slider","gallery"],accordion:["details","collapsible","expandable","disclosure"],collapsible:["accordion","details","expandable"],expandable:["accordion","collapsible","disclosure"],details:["accordion","summary","disclosure"],divider:["hr","separator","line","rule"],separator:["divider","hr","line"],hr:["divider","separator","horizontal-rule"],interactive:["hover","focus","active","disabled","button","link"],hover:["interactive","effect","state"],focus:["interactive","accessibility","state","outline"],disabled:["interactive","state","muted"],loading:["btn-working","spinner","async","progress"],spinner:["loading","btn-working","progress"],accessibility:["a11y","aria","focus","label","required"],a11y:["accessibility","aria","semantic"],aria:["accessibility","a11y","role"],required:["form","validation","asterisk","input"],validation:["form","required","error","feedback"],start:["getting-started","intro","overview","whatispds"],intro:["getting-started","overview","start","docs"],getting:["getting-started","start","intro"],overview:["intro","start","summary","layout-overview"],docs:["documentation","reference","guide"],primitive:["primitives"],component:["components"],enhancement:["enhancements"],foundation:["foundations","color","icon","typography","spacing","tokens"],utility:["utilities","text","backdrop","shadow","border","helper"],pattern:["patterns","layout","responsive","mobile-stack"]}};function Y(r,e){if(!r||!e)return!1;try{return r.matches(e)}catch{return!1}}function Gt(r,e){if(!r||!e||!r.closest)return null;try{return r.closest(e)}catch{return null}}function Vt(r,{maxDepth:e=5}={}){if(!r||r.closest&&r.closest(".showcase-toc"))return null;let t=r,a=0;for(;t&&a<e;){if(a++,t.tagName==="DS-SHOWCASE")return null;if(t.classList&&t.classList.contains("showcase-section")){t=t.parentElement;continue}for(let i of PDS.ontology.enhancements){let s=i.selector||i;if(Y(t,s))return{element:t,componentType:"enhanced-component",displayName:i.description||s,id:i.id}}if(t.tagName==="FIELDSET"){let i=t.getAttribute("role");if(i==="group"||i==="radiogroup")return{element:t,componentType:"form-group",displayName:i==="radiogroup"?"radio group":"form group"}}if(t.tagName==="LABEL"&&t.querySelector&&t.querySelector("input,select,textarea"))return{element:t,componentType:"form-control",displayName:"label with input"};let o=t.closest?t.closest("label"):null;if(o&&o.querySelector&&o.querySelector("input,select,textarea"))return{element:o,componentType:"form-control",displayName:"label with input"};for(let i of PDS.ontology.primitives){for(let s of i.selectors||[]){let n=String(s||"").trim();if(n.includes("*")){if(n.startsWith(".")){let l=n.slice(1).replace(/\*/g,"");if(t.classList&&Array.from(t.classList).some(h=>h.startsWith(l)))return{element:t,componentType:"pds-primitive",displayName:i.name||i.id,id:i.id,tags:i.tags};let d=t.parentElement,p=0;for(;d&&p<e;){if(d.classList&&Array.from(d.classList).some(h=>h.startsWith(l))&&d.tagName!=="DS-SHOWCASE")return{element:d,componentType:"pds-primitive",displayName:i.name||i.id,id:i.id,tags:i.tags};d=d.parentElement,p++}continue}continue}if(Y(t,n))return{element:t,componentType:"pds-primitive",displayName:i.name||i.id,id:i.id,tags:i.tags};let c=Gt(t,n);if(c&&c.tagName!=="DS-SHOWCASE")return{element:c,componentType:"pds-primitive",displayName:i.name||i.id,id:i.id,tags:i.tags}}if(t.classList){let s=Array.from(t.classList);for(let n of i.selectors||[])if(typeof n=="string"&&n.includes("*")&&n.startsWith(".")){let c=n.slice(1).replace(/\*/g,"");if(s.some(l=>l.startsWith(c)))return{element:t,componentType:"pds-primitive",displayName:i.name||i.id,id:i.id,tags:i.tags}}}}for(let i of PDS.ontology.layoutPatterns||[])for(let s of i.selectors||[]){let n=String(s||"").trim();if(n.includes("*")){if(n.startsWith(".")){let l=n.slice(1).replace(/\*/g,"");if(t.classList&&Array.from(t.classList).some(d=>d.startsWith(l)))return{element:t,componentType:"layout-pattern",displayName:i.name||i.id,id:i.id,tags:i.tags}}continue}if(Y(t,n))return{element:t,componentType:"layout-pattern",displayName:i.name||i.id,id:i.id,tags:i.tags};let c=Gt(t,n);if(c&&c.tagName!=="DS-SHOWCASE")return{element:c,componentType:"layout-pattern",displayName:i.name||i.id,id:i.id,tags:i.tags}}if(t.tagName&&t.tagName.includes("-")){let i=t.tagName.toLowerCase(),s=PDS.ontology.components.find(n=>n.selectors.includes(i));return{element:t,componentType:"web-component",displayName:s?.name||i,id:s?.id||i,tags:s?.tags}}if(t.tagName==="BUTTON"){let i=t.querySelector&&t.querySelector("pds-icon");return{element:t,componentType:"button",displayName:i?"button with icon":"button",id:"button"}}if(Y(t,"pds-icon")||t.closest&&t.closest("pds-icon")){let i=Y(t,"pds-icon")?t:t.closest("pds-icon");return{element:i,componentType:"icon",displayName:`pds-icon (${i.getAttribute&&i.getAttribute("icon")||"unknown"})`,id:"pds-icon"}}if(Y(t,"nav[data-dropdown]")||t.closest&&t.closest("nav[data-dropdown]"))return{element:Y(t,"nav[data-dropdown]")?t:t.closest("nav[data-dropdown]"),componentType:"navigation",displayName:"dropdown menu",id:"dropdown"};t=t.parentElement}return null}var Jt=Fe;var $=class r{static#a;static get instance(){return this.#a}#e;#r;constructor(e={}){this.options={debug:!1,...e},this.options.design||(this.options.design={}),this.options.debug&&this.options.log?.("debug","Generator options:",this.options),r.#a=this,this.tokens=this.generateTokens(),this.options.debug&&this.options.log?.("debug","Generated tokens:",this.tokens),this.#fe(),typeof CSSStyleSheet<"u"?this.#xe():this.options.debug&&this.options.log?.("debug","[Generator] Skipping browser features (CSSStyleSheet not available)")}generateTokens(){let e=this.options.design||{};return{colors:this.#s(e.colors||{}),spacing:this.generateSpacingTokens(e.spatialRhythm||{}),radius:this.#_(e.shape||{}),borderWidths:this.#M(e.shape||{}),typography:this.generateTypographyTokens(e.typography||{}),shadows:this.#L(e.layers||{}),layout:this.#D(e.layout||{}),transitions:this.#P(e.behavior||{}),zIndex:this.#R(e.layers||{}),icons:this.#F(e.icons||{})}}#s(e){let{primary:t="#3b82f6",secondary:a="#64748b",accent:o="#ec4899",background:i="#ffffff",success:s=null,warning:n="#FFBF00",danger:c=null,info:l=null,darkMode:d={}}=e,p={primary:this.#o(t),secondary:this.#o(a),accent:this.#o(o),success:this.#o(s||this.#w(t)),warning:this.#o(n||o),danger:this.#o(c||this.#x(t)),info:this.#o(l||t),gray:this.#u(a),surface:this.#h(i)};return p.surface.fieldset=this.#k(p.surface),p.surfaceSmart=this.#y(p.surface),p.dark=this.#$(p,i,d),p.dark&&p.dark.surface&&(p.dark.surfaceSmart=this.#y(p.dark.surface)),p.interactive={light:{fill:this.#b(p.primary,4.5),text:p.primary[600]},dark:{fill:this.#b(p.dark.primary,4.5),text:this.#A(p.dark.primary,p.dark.surface.base,4.5)}},p}#o(e){let t=this.#i(e);return{50:this.#t(t.h,Math.max(t.s-10,10),Math.min(t.l+45,95)),100:this.#t(t.h,Math.max(t.s-5,15),Math.min(t.l+35,90)),200:this.#t(t.h,t.s,Math.min(t.l+25,85)),300:this.#t(t.h,t.s,Math.min(t.l+15,75)),400:this.#t(t.h,t.s,Math.min(t.l+5,65)),500:e,600:this.#t(t.h,t.s,Math.max(t.l-10,25)),700:this.#t(t.h,t.s,Math.max(t.l-20,20)),800:this.#t(t.h,t.s,Math.max(t.l-30,15)),900:this.#t(t.h,t.s,Math.max(t.l-40,10))}}#w(e){let t=this.#i(e);return this.#t(120,Math.max(t.s,60),45)}#x(e){let t=this.#i(e);return this.#t(0,Math.max(t.s,70),50)}#u(e){let t=this.#i(e),a=t.h,o=Math.min(t.s,10);return{50:this.#t(a,o,98),100:this.#t(a,o,95),200:this.#t(a,o,88),300:this.#t(a,o,78),400:this.#t(a,o,60),500:e,600:this.#t(a,Math.min(o+5,15),45),700:this.#t(a,Math.min(o+8,18),35),800:this.#t(a,Math.min(o+10,20),20),900:this.#t(a,Math.min(o+12,22),10)}}#h(e){let t=this.#i(e);return{base:e,subtle:this.#t(t.h,Math.max(t.s,2),Math.max(t.l-2,2)),elevated:this.#t(t.h,Math.max(t.s,3),Math.max(t.l-4,5)),sunken:this.#t(t.h,Math.max(t.s,4),Math.max(t.l-6,8)),overlay:this.#t(t.h,Math.max(t.s,2),Math.min(t.l+2,98)),inverse:this.#g(e),hover:"color-mix(in oklab, var(--color-surface-base) 92%, var(--color-text-primary) 8%);"}}#k(e){return{base:e.subtle,subtle:e.elevated,elevated:e.sunken,sunken:this.#S(e.sunken,.05),overlay:e.elevated}}#S(e,t=.05){let a=this.#i(e),o=Math.max(a.l-a.l*t,5);return this.#t(a.h,a.s,o)}#g(e){let t=this.#i(e);if(t.l>50){let a=Math.min(t.s+5,25),o=Math.max(12-(t.l-50)*.1,8);return this.#t(t.h,a,o)}else{let a=Math.max(t.s-10,5),o=Math.min(85+(50-t.l)*.3,95);return this.#t(t.h,a,o)}}#$(e,t="#ffffff",a={}){let o=a.background?a.background:this.#g(t),i=this.#h(o),s=a.primary?this.#o(a.primary):this.#n(e.primary);return{surface:{...i,fieldset:this.#T(i)},primary:s,secondary:a.secondary?this.#o(a.secondary):this.#n(e.secondary),accent:a.accent?this.#o(a.accent):this.#n(e.accent),gray:a.secondary?this.#u(a.secondary):e.gray,success:this.#n(e.success),info:this.#n(e.info),warning:this.#n(e.warning),danger:this.#n(e.danger)}}#l(e){let t=String(e||"").replace("#",""),a=t.length===3?t.split("").map(i=>i+i).join(""):t,o=parseInt(a,16);return{r:o>>16&255,g:o>>8&255,b:o&255}}#p(e){let{r:t,g:a,b:o}=this.#l(e),i=[t/255,a/255,o/255].map(s=>s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4));return .2126*i[0]+.7152*i[1]+.0722*i[2]}#d(e,t){let a=this.#p(e),o=this.#p(t),i=Math.max(a,o),s=Math.min(a,o);return(i+.05)/(s+.05)}#m(e,t=4.5){if(!e)return"#000000";let a="#ffffff",o="#000000",i=this.#d(e,a);if(i>=t)return a;let s=this.#d(e,o);return s>=t||s>i?o:a}#f(e,t=1){let{r:a,g:o,b:i}=this.#l(e);return`rgba(${a}, ${o}, ${i}, ${t})`}#C(e,t,a=.5){let o=this.#l(e),i=this.#l(t),s=Math.round(o.r+(i.r-o.r)*a),n=Math.round(o.g+(i.g-o.g)*a),c=Math.round(o.b+(i.b-o.b)*a);return this.#E(s,n,c)}#E(e,t,a){let o=i=>{let s=Math.max(0,Math.min(255,Math.round(i))).toString(16);return s.length===1?"0"+s:s};return`#${o(e)}${o(t)}${o(a)}`}#T(e){return{base:e.elevated,subtle:e.overlay,elevated:this.#v(e.elevated,.08),sunken:e.elevated,overlay:this.#v(e.overlay,.05)}}#A(e={},t="#000000",a=4.5){let o=["600","700","800","500","400","900","300","200"],i={shade:null,color:null,ratio:0};for(let s of o){let n=e?.[s];if(!n||typeof n!="string")continue;let c=this.#d(n,t);if(c>i.ratio&&(i={shade:s,color:n,ratio:c}),c>=a)return n}return i.color||e?.["600"]||e?.["500"]}#b(e={},t=4.5){let a=["600","700","800","500","400","900"],o={shade:null,color:null,ratio:0};for(let i of a){let s=e?.[i];if(!s||typeof s!="string")continue;let n=this.#d(s,"#ffffff");if(n>o.ratio&&(o={shade:i,color:s,ratio:n}),n>=t)return s}return o.color||e?.["600"]||e?.["500"]}#y(e){let t={};return Object.entries(e).forEach(([a,o])=>{if(!o||typeof o!="string"||!o.startsWith("#"))return;let i=this.#p(o)<.5,s=this.#m(o,4.5),n=this.#m(o,3),c=this.#C(s,o,.4),l=s,d=c,p=i?"#ffffff":"#000000",h=i?.25:.1,g=this.#f(p,h),y=i?"#ffffff":"#000000",f=i?.15:.1,b=this.#f(y,f);t[a]={bg:o,text:s,textSecondary:n,textMuted:c,icon:l,iconSubtle:d,shadow:g,border:b,scheme:i?"dark":"light"}}),t}#v(e,t=.05){let a=this.#i(e),o=Math.min(a.l+(100-a.l)*t,95);return this.#t(a.h,a.s,o)}#n(e){let t={};return Object.entries({50:{source:"900",dimFactor:.8},100:{source:"800",dimFactor:.8},200:{source:"700",dimFactor:.8},300:{source:"600",dimFactor:.8},400:{source:"500",dimFactor:.85},500:{source:"400",dimFactor:.85},600:{source:"300",dimFactor:.85},700:{source:"200",dimFactor:.85},800:{source:"100",dimFactor:.95},900:{source:"50",dimFactor:.95}}).forEach(([o,i])=>{let s=e[i.source];t[o]=this.#z(s,i.dimFactor)}),t}#z(e,t=.8){let a=this.#i(e),o=Math.max(a.s*t,5),i=Math.max(a.l*t,5);return this.#t(a.h,o,i)}generateSpacingTokens(e){let{baseUnit:t=4,scaleRatio:a=1.25,maxSpacingSteps:o=12}=e,i=Number.isFinite(Number(t))?Number(t):4,s=Math.min(Number.isFinite(Number(o))?Number(o):12,12),n={0:"0"};for(let c=1;c<=s;c++)n[c]=`${i*c}px`;return n}#_(e){let{radiusSize:t="medium",customRadius:a=null}=e,o;a!=null?o=a:typeof t=="number"?o=t:typeof t=="string"?o=u.RadiusSizes[t]??u.RadiusSizes.medium:o=u.RadiusSizes.medium;let i=Number.isFinite(Number(o))?Number(o):u.RadiusSizes.medium;return{none:"0",xs:`${Number.isFinite(i*.25)?Math.round(i*.25):0}px`,sm:`${Number.isFinite(i*.5)?Math.round(i*.5):0}px`,md:`${i}px`,lg:`${Number.isFinite(i*1.5)?Math.round(i*1.5):0}px`,xl:`${Number.isFinite(i*2)?Math.round(i*2):0}px`,full:"9999px"}}#M(e){let{borderWidth:t="medium"}=e,a;return typeof t=="number"?a=t:typeof t=="string"?a=u.BorderWidths[t]??u.BorderWidths.medium:a=u.BorderWidths.medium,{hairline:`${u.BorderWidths.hairline}px`,thin:`${u.BorderWidths.thin}px`,medium:`${u.BorderWidths.medium}px`,thick:`${u.BorderWidths.thick}px`}}generateTypographyTokens(e){let{fontFamilyHeadings:t="system-ui, -apple-system, sans-serif",fontFamilyBody:a="system-ui, -apple-system, sans-serif",fontFamilyMono:o='ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace',baseFontSize:i=16,fontScale:s=1.25,fontWeightLight:n=u.FontWeights.light,fontWeightNormal:c=u.FontWeights.normal,fontWeightMedium:l=u.FontWeights.medium,fontWeightSemibold:d=u.FontWeights.semibold,fontWeightBold:p=u.FontWeights.bold,lineHeightTight:h=u.LineHeights.tight,lineHeightNormal:g=u.LineHeights.normal,lineHeightRelaxed:y=u.LineHeights.relaxed}=e,f=Number.isFinite(Number(i))?Number(i):16,b=Number.isFinite(Number(s))?Number(s):1.25;return{fontFamily:{headings:t,body:a,mono:o},fontSize:{xs:`${Math.round(f/Math.pow(b,2))}px`,sm:`${Math.round(f/b)}px`,base:`${f}px`,lg:`${Math.round(f*b)}px`,xl:`${Math.round(f*Math.pow(b,2))}px`,"2xl":`${Math.round(f*Math.pow(b,3))}px`,"3xl":`${Math.round(f*Math.pow(b,4))}px`,"4xl":`${Math.round(f*Math.pow(b,5))}px`},fontWeight:{light:n?.toString()||"300",normal:c?.toString()||"400",medium:l?.toString()||"500",semibold:d?.toString()||"600",bold:p?.toString()||"700"},lineHeight:{tight:h?.toString()||"1.25",normal:g?.toString()||"1.5",relaxed:y?.toString()||"1.75"}}}#L(e){let{baseShadowOpacity:t=.1,shadowBlurMultiplier:a=1,shadowOffsetMultiplier:o=1}=e,i=`rgba(0, 0, 0, ${t})`,s=`rgba(0, 0, 0, ${t*.5})`;return{sm:`0 ${1*o}px ${2*a}px 0 ${s}`,base:`0 ${1*o}px ${3*a}px 0 ${i}, 0 ${1*o}px ${2*a}px 0 ${s}`,md:`0 ${4*o}px ${6*a}px ${-1*o}px ${i}, 0 ${2*o}px ${4*a}px ${-1*o}px ${s}`,lg:`0 ${10*o}px ${15*a}px ${-3*o}px ${i}, 0 ${4*o}px ${6*a}px ${-2*o}px ${s}`,xl:`0 ${20*o}px ${25*a}px ${-5*o}px ${i}, 0 ${10*o}px ${10*a}px ${-5*o}px ${s}`,inner:`inset 0 ${2*o}px ${4*a}px 0 ${s}`}}#D(e){let{maxWidth:t=1200,containerPadding:a=16,breakpoints:o={sm:640,md:768,lg:1024,xl:1280}}=e;return{maxWidth:`${t}px`,minHeight:"100vh",containerPadding:`${a}px`,breakpoints:{sm:`${o.sm}px`,md:`${o.md}px`,lg:`${o.lg}px`,xl:`${o.xl}px`},pageMargin:"120px",sectionGap:"160px",containerGap:"200px",heroSpacing:"240px",footerSpacing:"160px"}}#P(e){let{transitionSpeed:t=u.TransitionSpeeds.normal,animationEasing:a=u.AnimationEasings["ease-out"]}=e,o;return typeof t=="number"?o=t:typeof t=="string"&&u.TransitionSpeeds[t]?o=u.TransitionSpeeds[t]:o=u.TransitionSpeeds.normal,{fast:`${Math.round(o*.6)}ms`,normal:`${o}ms`,slow:`${Math.round(o*1.4)}ms`}}#R(e){let{baseZIndex:t=1e3,zIndexStep:a=10}=e;return{dropdown:t.toString(),sticky:(t+a*2).toString(),fixed:(t+a*3).toString(),modal:(t+a*4).toString(),drawer:(t+a*5).toString(),popover:(t+a*6).toString(),tooltip:(t+a*7).toString(),notification:(t+a*8).toString()}}#F(e){let{set:t="phosphor",weight:a="regular",defaultSize:o=24,sizes:i={xs:16,sm:20,md:24,lg:32,xl:48,"2xl":64},spritePath:s="/assets/pds/icons/pds-icons.svg",externalPath:n="/assets/img/icons/"}=e;return{set:t,weight:a,defaultSize:`${o}px`,sizes:Object.fromEntries(Object.entries(i).map(([c,l])=>[c,`${l}px`])),spritePath:s,externalPath:n}}#I(e){let t=[];t.push(` /* Colors */
4
4
  `);let a=(o,i="")=>{Object.entries(o).forEach(([s,n])=>{typeof n=="object"&&n!==null?a(n,`${i}${s}-`):typeof n=="string"&&t.push(` --color-${i}${s}: ${n};
5
5
  `)})};return Object.entries(e).forEach(([o,i])=>{o!=="dark"&&o!=="surfaceSmart"&&o!=="interactive"&&typeof i=="object"&&i!==null&&a(i,`${o}-`)}),e.surfaceSmart&&(t.push(` /* Smart Surface Tokens (context-aware) */
6
6
  `),Object.entries(e.surfaceSmart).forEach(([o,i])=>{t.push(` --surface-${o}-bg: ${i.bg};
@@ -617,10 +617,8 @@ form {
617
617
  }
618
618
 
619
619
  fieldset {
620
- margin: 0;
621
- padding: var(--spacing-5);
620
+ margin: 0;
622
621
  width: 100%;
623
- background-color: color-mix(in oklab, var(--color-surface-subtle) 50%, transparent 50%);
624
622
 
625
623
  /* Unified styling for radio groups and checkbox groups */
626
624
  &[role="radiogroup"],
@@ -1814,7 +1812,7 @@ dialog form {
1814
1812
  margin: 0;
1815
1813
  }
1816
1814
 
1817
- /* Dialog fields - to open pds-jsonform subforms */
1815
+ /* Dialog fields - to open pds-form subforms */
1818
1816
  .dialog-field {
1819
1817
  margin-top: var(--spacing-3);
1820
1818
  }
@@ -2743,9 +2741,6 @@ nav[data-dropdown] {
2743
2741
 
2744
2742
  :where(fieldset) {
2745
2743
  border: none;
2746
- padding: var(--spacing-4);
2747
- margin: 0 0 var(--spacing-4) 0;
2748
- background-color: var(--color-surface-subtle);
2749
2744
  }
2750
2745
 
2751
2746
  :where(legend) {
@@ -3226,7 +3221,7 @@ export const ${e}CSS = \`${a}\`;
3226
3221
  ${this.settings.hideCategory?"":`<span class="category">${s.category||""}</span>`}
3227
3222
  </div>`;e.forEach(i=>{let s=t.categories[i.category]||{};i.element?this.resultsDiv.appendChild(i.element):(i=typeof i=="string"?{text:i}:i,this.resultsDiv.appendChild(mr(o(s,i))[0])),a++}),e.length?(this.acItems=this.resultsDiv.querySelectorAll(".ac-itm"),this.controller().show()):t.search.length&&this.controller().empty()}handleImageOrIcon(e){return e.image?`<img src="${e.image}"/>`:typeof this.settings.iconHandler=="function"?this.settings.iconHandler(e):`<svg-icon icon="${e.icon}"></svg-icon>`}formatResultItem(e,t,a){let o=typeof e=="string"?{text:e}:e,i=o.text;return t.search&&(i=i.replace("%search%",t.search),o.description=o.description?.replace("%search%",t.search)),i=this.highlight(i,t.search),o.description&&(i=`<div>${i}</div><small>${o.description}</small>`),a.format&&(i=a.format({item:o,result:i,options:t})),i}highlight(e,t){var a=new RegExp("("+t+")","gi");return e.replace(a,'<span class="txt-hl">$1</span>')}async getItems(e,t){this.aborter&&this.aborter.abort();let a=this.caches.get(e.search);if(a)return a;let o=this.settings.map,i=c=>(typeof c=="string"&&(c={text:c}),c),s=c=>o?c.map(l=>({text:l[o]})):c.map(l=>i(l)),n=c=>(this.settings.max&&this.settings.max>0&&(c.length=this.settings.max),c);return this.aborter=new AbortController,this.aborterSignal=this.aborter.signal,new Promise(c=>{let l=d=>{d=this.sort(d,e),this.settings.cache!==!1&&this.caches.set(e.search,d),c(d)};if(br(this.items)){if(this.settings.minlength>0&&(!e.search||e.search.length<this.settings.minlength)){l([]);return}let d=this.formatSearch(this.items,e);fetch(d).then(p=>{if(p.status===200){p.json().then(h=>{h=s(h),l(n(h.filter(g=>this.isMatch(e,g))))});return}throw Error(`HTTP error ${p.status} - ${d}`)})}else if(Array.isArray(this.items)){let d=!0;this.items=this.items.map(p=>typeof p=="string"?{text:p}:(d=!1,p)),d&&this.container.classList.add("simple"),l(n(s(this.items)))}else if(typeof this.items=="function")e.control=this.container,Promise.resolve(this.items(e,t)).then(p=>{p=p.map(h=>i(h)),p=s(p),l(p)});else return l(Promise.resolve(this.items.apply(this,e)))})}async items(e){let t=[];e.results=[],e.signal=this.aborterSignal;for(var a in e.categories){let o=e.categories[a];if(o.trigger=o.trigger??(()=>!0),e.results=t,o.trigger(e)){let i=[];try{i=await o.getItems(e)}catch(s){console.warn(`Error loading items for omniBox category '${a}'.`,s)}t=t.concat(i.map(s=>(s.category=a,s)))}}return t}formatSearch(e,t){return e.indexOf("%search%")?e.replace("%search%",t.search||""):e+"?"+this.createQueryParam(t)}createQueryParam(e){let t=e.suggest?"&suggest=true":"";return`q=${e.text}${t}`}isMatch(e,t){return t.text?.indexOf("%search%")>=0?!0:e.search?t.text?.toLowerCase().indexOf(e.search.toLowerCase())>=0:e.suggest}static textFilter(e,t){return function(a){if(!e.search)return!0;if(a.hidden)return!1;let i=(t?a[t]:a).match(new RegExp(e.search,"gi"));if(i)return i;if(a.config?.tags)return a.config.tags.some(s=>s.match(new RegExp(e.search,"gi")))}}};function vr(r){function e(o,i,s){let n=o[0];if(n==="colors")return i==="scheme"?"string":"color";if(n==="spacing"||n==="radius"||n==="borderWidths")return"dimension";if(n==="typography"){let c=o[1];return c==="fontFamily"?"fontFamily":c==="fontSize"?"fontSize":c==="fontWeight"?"fontWeight":c==="lineHeight"?"lineHeight":"string"}if(n==="shadows")return"shadow";if(n==="layout")return"dimension";if(n==="transitions")return"duration";if(n==="zIndex")return"number";if(n==="icons")return i==="defaultSize"||o.includes("sizes")?"dimension":"string";if(typeof s=="number")return"number";if(typeof s=="string"){if(/^\d+(\.\d+)?ms$/.test(s))return"duration";if(/^\d+(\.\d+)?(px|rem|em|vh|vw|%)$/.test(s))return"dimension";if(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(s)||/^(rgb|rgba|hsl|hsla|oklab|lab)\(/.test(s))return"color"}}function t(o){return o!==null&&typeof o=="object"&&!Array.isArray(o)}function a(o,i=[]){if(o==null)return o;if(Array.isArray(o))return o.map((l,d)=>a(l,i.concat(String(d))));if(t(o)){if(Object.prototype.hasOwnProperty.call(o,"value")&&(Object.prototype.hasOwnProperty.call(o,"type")||Object.keys(o).length===1))return o;let l={};for(let[d,p]of Object.entries(o))l[d]=a(p,i.concat(d));return l}let s=i[i.length-1]??"",n=e(i,s,o),c=o;if(n==="number"&&typeof c=="string"){let l=Number(c);Number.isNaN(l)||(c=l)}return n?{value:c,type:n}:{value:c}}return a(r,[])}var wr="pure-ds-config";async function W(r,e={}){let t=document.querySelector("#global-toaster");return t||(t=document.createElement("pds-toaster"),t.id="global-toaster",document.body.appendChild(t),await customElements.whenDefined("pds-toaster")),t.toast(r,e)}customElements.define("pds-config-form",class extends R{#a;#e=0;#r=null;#s=null;#o=500;static properties={config:{type:Object,state:!0},schema:{type:Object,state:!0},mode:{type:String},inspectorMode:{type:Boolean,state:!0},formValues:{type:Object,state:!0},validationIssues:{type:Array,state:!0},formKey:{type:Number,state:!0},showInspector:{type:Boolean,attribute:"show-inspector"},showPresetSelector:{type:Boolean,attribute:"show-preset-selector"},showThemeSelector:{type:Boolean,attribute:"show-theme-selector"}};createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.formKey=0,this._validationToastId=null,this.mode="simple",this.inspectorMode=!1,this.config=this.loadConfig(),this._inspectorDeactivateHandler=()=>{this.inspectorMode&&(this.inspectorMode=!1,this.dispatchInspectorModeChange())},m.addEventListener("pds:inspector:deactivate",this._inspectorDeactivateHandler);try{m._applyResolvedTheme(m.theme),m._setupSystemListenerIfNeeded(m.theme)}catch{}this.updateForm(),this.applyDefaultHostVariables(),this._initialValidationScheduled=!1,this._loadingToastShown=!1}disconnectedCallback(){super.disconnectedCallback(),this._inspectorDeactivateHandler&&(m.removeEventListener("pds:inspector:deactivate",this._inspectorDeactivateHandler),this._inspectorDeactivateHandler=null)}applyDefaultHostVariables(){try{let r=structuredClone(C.default),e=new $({design:r}),t=e.generateSpacingTokens(r.spatialRhythm||{});Object.entries(t).forEach(([s,n])=>{try{this.style.setProperty(`--spacing-${s}`,n)}catch{}});let a=r.spatialRhythm&&r.spatialRhythm.baseUnit||16;this.style.setProperty("--base-unit",`${a}px`);let o=e.generateTypographyTokens(r.typography||{});o.fontSize&&Object.entries(o.fontSize).forEach(([s,n])=>{this.style.setProperty(`--font-size-${s}`,n)});let i=r.typography&&r.typography.baseFontSize||16;this.style.setProperty("--base-font-size",`${i}px`),o.fontFamily&&Object.entries(o.fontFamily).forEach(([s,n])=>{this.style.setProperty(`--font-family-${s}`,n)}),o.lineHeight&&Object.entries(o.lineHeight).forEach(([s,n])=>{this.style.setProperty(`--font-lineHeight-${s}`,n)}),console.debug("pds-config-form: applied default host CSS variables")}catch(r){console.warn("pds-config-form: failed to apply default host variables",r)}}updateForm(){this.schema=null,fetch(`/assets/data/auto-design-${this.mode}.json`).then(r=>r.json()).then(r=>{this.schema=r,this.formValues=this.filterConfigForSchema(this.config),this.formKey=(this.formKey||0)+1}).catch(r=>{console.warn("Failed to load schema:",r)})}_isEqual(r,e){if(r===e)return!0;if(typeof r!=typeof e)return!1;if(r&&e&&typeof r=="object"){if(Array.isArray(r)){if(!Array.isArray(e)||r.length!==e.length)return!1;for(let o=0;o<r.length;o++)if(!this._isEqual(r[o],e[o]))return!1;return!0}let t=Object.keys(r),a=Object.keys(e);t.length,a.length;for(let o of new Set([...t,...a]))if(!this._isEqual(r[o],e[o]))return!1;return!0}return!1}_deepDiff(r,e){if(!this._isEqual(r,e)){if(r&&e&&typeof r=="object"&&typeof e=="object"&&!Array.isArray(r)&&!Array.isArray(e)){let t={},a=new Set([...Object.keys(e)]);for(let o of a){let i=this._deepDiff(r[o],e[o]);i!==void 0&&(t[o]=i)}return Object.keys(t).length?t:void 0}return this._isEqual(r,e)?void 0:e}}_resolvePresetBase(r){let e=String(r||"default").toLowerCase(),t=C?.[e]||C?.default;return JSON.parse(JSON.stringify(t||C.default))}loadConfig(){let r=localStorage.getItem(wr);if(r)try{let e=JSON.parse(r);if(e&&("preset"in e||"design"in e)){let a=e.preset||"default",o=this._resolvePresetBase(a),i=Z(o,e.design||{});return this._stored={preset:a,design:e.design||{}},this._legacy=!1,i}let t=Z(config.design,e);return this._stored=null,this._legacy=!0,t}catch(e){console.warn("Failed to parse stored config, using defaults",e)}return this._stored={preset:"default",design:{}},this._legacy=!1,JSON.parse(JSON.stringify(this._resolvePresetBase("default")))}saveConfig(){try{let r=this._stored&&this._stored.preset||"default",e=this._resolvePresetBase(r),t=this._deepDiff(e,this.config)||{},a={preset:r,design:t};localStorage.setItem(wr,JSON.stringify(a)),this._stored=a,this._legacy=!1}catch(r){console.warn("Failed to save config: ",r)}}updated(r){if(r.has("schema")){this.formValues=this.filterConfigForSchema(this.config);let e=this._initialValidationScheduled?50:150;this._initialValidationScheduled=!0,setTimeout(()=>{try{this.applyStyles(!0)}catch(t){console.warn("Delayed applyStyles failed:",t)}},e)}}async applyStyles(r=!1){let e=structuredClone(C.default);if(r&&this.config){let o=this._stored&&this._stored.preset||"default",i=this._resolvePresetBase(o);e=Z(i,this.config)}if(e.typography)try{await je(e.typography)}catch(o){console.warn("Failed to load some fonts from Google Fonts:",o)}try{let o=He(e);if(!o.ok){if(this.validationIssues=o.issues,!this._validationToastId){let i=o.issues.slice(0,3).map(s=>`\u2022 ${s.message}`).join(`
3228
3223
  `);this._validationToastId=W(`Design has accessibility issues. Fix before applying.
3229
- ${i}`,{type:"error",persistent:!0})}return}this.validationIssues=[],this._validationToastId&&(document.querySelector("#global-toaster")?.dismissToast(this._validationToastId),this._validationToastId=null)}catch(o){console.warn("Validation failed unexpectedly:",o)}let t=m.theme||null,a={design:structuredClone(e)};t&&(a.theme=t),this.generator=new $(a),$.applyStyles();try{m._applyResolvedTheme(m.theme),m._setupSystemListenerIfNeeded(m.theme)}catch{}this.scheduleDesignUpdatedEmit({config:e,designer:this.generator})}scheduleDesignUpdatedEmit(r){let e=Date.now(),t=()=>{this.#e=Date.now(),this.#r&&(clearTimeout(this.#r),this.#r=null),m.dispatchEvent(new CustomEvent("pds:design:updated",{detail:r}))};if(e-this.#e>=this.#o){t();return}if(!this.#r){let a=this.#o-(e-this.#e);this.#r=setTimeout(()=>{this.#r=null,t()},a)}}toggleInspectorMode(){this.inspectorMode=!this.inspectorMode,this.dispatchInspectorModeChange(),W(this.inspectorMode?"Code Inspector active - click any element in the showcase to view its code":"Code Inspector deactivated",{type:"info",duration:3e3})}dispatchInspectorModeChange(){m.dispatchEvent(new CustomEvent("pds:inspector:mode:changed",{detail:{active:this.inspectorMode}}))}flattenConfig(r,e=""){let t={};for(let[a,o]of Object.entries(r)){let i=e?`${e}/${a}`:`/${a}`;o&&typeof o=="object"&&!Array.isArray(o)?Object.assign(t,this.flattenConfig(o,i)):t[i]=o}return t}getSchemaProperties(r,e=""){let t=new Set;if(!r||!r.properties)return t;for(let[a,o]of Object.entries(r.properties)){let i=e?`${e}/${a}`:`/${a}`;t.add(i),o.type==="object"&&o.properties&&this.getSchemaProperties(o,i).forEach(n=>t.add(n))}return t}filterConfigForSchema(r){if(!r)return{};if(!this.schema)return this.flattenConfig(r);let e=this.getSchemaProperties(this.schema),t=this.flattenConfig(r),a={};for(let[o,i]of Object.entries(t))e.has(o)&&i!==null&&i!==void 0&&(a[o]=i);return a}handleFormChange=r=>{let e,t=null;if(r.type==="pw:value-change"&&r.detail&&(t=r.detail.name),r.detail&&r.detail.json)e=r.detail.json;else{let n=r.currentTarget?.tagName?.toUpperCase()==="PDS-JSONFORM"?r.currentTarget:this.querySelector("pds-jsonform");if(n)e=n.getValuesFlat?.()||n.values||{};else{console.warn("No form element found in form change event",r);return}}console.log("Form values received:",e);let a={},o=n=>n.replace(/~1/g,"/").replace(/~0/g,"~");for(let[n,c]of Object.entries(e))if(n)if(n.startsWith("/")){let d=n.replace(/^\//,"").split("/").map(o),p=a;for(let h=0;h<d.length-1;h++){let g=d[h];(!p[g]||typeof p[g]!="object")&&(p[g]={}),p=p[g]}p[d[d.length-1]]=c}else if(n.includes(".")){let l=n.split("."),d=a;for(let p=0;p<l.length-1;p++)(!d[l[p]]||typeof d[l[p]]!="object")&&(d[l[p]]={}),d=d[l[p]];d[l[l.length-1]]=c}else a[n]=c;console.log("Nested values:",a);let i=Z(structuredClone(this.config),a),s=m.validateDesign(i);if(!s.ok){if(this.validationIssues=s.issues,!this._validationToastId){let n=s.issues.slice(0,3).map(c=>`\u2022 ${c.message}`).join(`
3224
+ ${i}`,{type:"error",persistent:!0})}return}this.validationIssues=[],this._validationToastId&&(document.querySelector("#global-toaster")?.dismissToast(this._validationToastId),this._validationToastId=null)}catch(o){console.warn("Validation failed unexpectedly:",o)}let t=m.theme||null,a={design:structuredClone(e)};t&&(a.theme=t),this.generator=new $(a),$.applyStyles();try{m._applyResolvedTheme(m.theme),m._setupSystemListenerIfNeeded(m.theme)}catch{}this.scheduleDesignUpdatedEmit({config:e,designer:this.generator})}scheduleDesignUpdatedEmit(r){let e=Date.now(),t=()=>{this.#e=Date.now(),this.#r&&(clearTimeout(this.#r),this.#r=null),m.dispatchEvent(new CustomEvent("pds:design:updated",{detail:r}))};if(e-this.#e>=this.#o){t();return}if(!this.#r){let a=this.#o-(e-this.#e);this.#r=setTimeout(()=>{this.#r=null,t()},a)}}toggleInspectorMode(){this.inspectorMode=!this.inspectorMode,this.dispatchInspectorModeChange(),W(this.inspectorMode?"Code Inspector active - click any element in the showcase to view its code":"Code Inspector deactivated",{type:"info",duration:3e3})}dispatchInspectorModeChange(){m.dispatchEvent(new CustomEvent("pds:inspector:mode:changed",{detail:{active:this.inspectorMode}}))}flattenConfig(r,e=""){let t={};for(let[a,o]of Object.entries(r)){let i=e?`${e}/${a}`:`/${a}`;o&&typeof o=="object"&&!Array.isArray(o)?Object.assign(t,this.flattenConfig(o,i)):t[i]=o}return t}getSchemaProperties(r,e=""){let t=new Set;if(!r||!r.properties)return t;for(let[a,o]of Object.entries(r.properties)){let i=e?`${e}/${a}`:`/${a}`;t.add(i),o.type==="object"&&o.properties&&this.getSchemaProperties(o,i).forEach(n=>t.add(n))}return t}filterConfigForSchema(r){if(!r)return{};if(!this.schema)return this.flattenConfig(r);let e=this.getSchemaProperties(this.schema),t=this.flattenConfig(r),a={};for(let[o,i]of Object.entries(t))e.has(o)&&i!==null&&i!==void 0&&(a[o]=i);return a}handleFormChange=r=>{let e,t=null;if(r.type==="pw:value-change"&&r.detail&&(t=r.detail.name),r.detail&&r.detail.json)e=r.detail.json;else{let n=r.currentTarget?.tagName?.toUpperCase()==="pds-form"?r.currentTarget:this.querySelector("pds-form");if(n)e=n.getValuesFlat?.()||n.values||{};else{console.warn("No form element found in form change event",r);return}}console.log("Form values received:",e);let a={},o=n=>n.replace(/~1/g,"/").replace(/~0/g,"~");for(let[n,c]of Object.entries(e))if(n)if(n.startsWith("/")){let d=n.replace(/^\//,"").split("/").map(o),p=a;for(let h=0;h<d.length-1;h++){let g=d[h];(!p[g]||typeof p[g]!="object")&&(p[g]={}),p=p[g]}p[d[d.length-1]]=c}else if(n.includes(".")){let l=n.split("."),d=a;for(let p=0;p<l.length-1;p++)(!d[l[p]]||typeof d[l[p]]!="object")&&(d[l[p]]={}),d=d[l[p]];d[l[l.length-1]]=c}else a[n]=c;console.log("Nested values:",a);let i=Z(structuredClone(this.config),a),s=m.validateDesign(i);if(!s.ok){if(this.validationIssues=s.issues,!this._validationToastId){let n=s.issues.slice(0,3).map(c=>`\u2022 ${c.message}`).join(`
3230
3225
  `);this._validationToastId=W(`Design has accessibility issues. Fix before saving.
3231
3226
  ${n}`,{type:"error"})}return}this.validationIssues=[];try{this._validationToastId&&(document.querySelector("#global-toaster")?.dismissToast(this._validationToastId),this._validationToastId=null)}catch{}this.config=i,console.log("Updated (persisted) config (not applied):",this.config),this.saveConfig(),t&&(console.log("\u{1F514} Emitting design-field-changed event for field:",t),m.dispatchEvent(new CustomEvent("pds:design:field:changed",{detail:{field:t,config:this.config}})));try{this.#s&&(clearTimeout(this.#s),this.#s=null),this.#s=setTimeout(()=>{this.#s=null,this.applyStyles(!0)},this.#o)}catch(n){console.warn("Failed to schedule applyStyles with user config:",n)}};handleReset=async()=>{if(await m.ask("Reset to default configuration? This will clear your saved settings.")){this._stored={preset:"default",design:{}};let e=this._resolvePresetBase("default");this.config=JSON.parse(JSON.stringify(e)),this.formValues=this.filterConfigForSchema(this.config),this.formKey=(this.formKey||0)+1,this.saveConfig(),this.applyStyles(!0),W("Configuration reset to defaults",{type:"info",duration:2e3})}};applyPreset=async r=>{if(await m.ask(`Load "${r.name}" preset? This will replace your current settings.`)){let t=JSON.parse(JSON.stringify(r)),a=m.validateDesign(t);if(!a.ok){if(this.validationIssues=a.issues,!this._validationToastId){let o=a.issues.slice(0,3).map(i=>`\u2022 ${i.message}`).join(`
3232
3227
  `);this._validationToastId=W(`Preset "${r.name}" has accessibility issues \u2014 not applied.
@@ -3326,7 +3321,7 @@ export const pdsConfig = ${JSON.stringify(this.config,null,2)};
3326
3321
  </div>
3327
3322
 
3328
3323
  <div class="designer-form-container">
3329
- <pds-jsonform
3324
+ <pds-form
3330
3325
  .jsonSchema=${this.schema}
3331
3326
  .uiSchema=${this._designerUiSchema()}
3332
3327
  .values=${this.formValues||{}}
@@ -3335,7 +3330,7 @@ export const pdsConfig = ${JSON.stringify(this.config,null,2)};
3335
3330
  @pw:value-change=${this.handleFormChange}
3336
3331
  @pw:serialize=${this.handleFormChange}
3337
3332
  >
3338
- </pds-jsonform>
3333
+ </pds-form>
3339
3334
  </div>
3340
3335
 
3341
3336
  <div class="designer-actions">