@pure-ds/core 0.5.19 → 0.5.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/pds.d.ts +0 -1
- package/dist/types/public/assets/js/pds-manager.d.ts +5 -5
- package/dist/types/public/assets/js/pds.d.ts +3 -1
- package/dist/types/public/assets/js/pds.d.ts.map +1 -1
- package/dist/types/public/assets/pds/components/pds-drawer.d.ts +1 -0
- package/dist/types/public/assets/pds/components/pds-drawer.d.ts.map +1 -1
- package/dist/types/src/js/pds-core/pds-live.d.ts.map +1 -1
- package/dist/types/src/js/pds-core/pds-start-helpers.d.ts +0 -3
- package/dist/types/src/js/pds-core/pds-start-helpers.d.ts.map +1 -1
- package/dist/types/src/js/pds.d.ts +2 -0
- package/dist/types/src/js/pds.d.ts.map +1 -1
- package/package.json +1 -1
- package/packages/pds-cli/bin/generate-css-data.js +7 -2
- package/packages/pds-cli/bin/pds-bootstrap.js +35 -92
- package/packages/pds-cli/bin/postinstall.mjs +2 -61
- package/packages/pds-cli/bin/templates/starter-templates.js +62 -0
- package/public/assets/js/app.js +16 -16
- package/public/assets/js/pds-manager.js +47 -47
- package/public/assets/js/pds.js +5 -5
- package/public/assets/pds/components/pds-drawer.js +142 -2
- package/readme.md +4 -162
- package/src/js/pds-core/pds-live.js +0 -26
- package/src/js/pds-core/pds-start-helpers.js +0 -60
- package/src/js/pds.d.ts +0 -1
- package/src/js/pds.js +26 -39
package/public/assets/js/app.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var fr=Object.defineProperty;var br=(r,e)=>()=>(r&&(e=r(r=0)),e);var yr=(r,e)=>{for(var t in e)fr(r,t,{get:e[t],enumerable:!0})};var Yt={};yr(Yt,{AutoDefiner:()=>ct});async function ao(...r){let e={};r.length&&typeof r[r.length-1]=="object"&&(e=r.pop()||{});let t=r,{baseURL:o,mapper:a=p=>`${p}.js`,onError:i=(p,d)=>console.error(`[defineWebComponents] ${p}:`,d)}=e,s=o?new URL(o,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),n=p=>p.toLowerCase().replace(/(^|-)([a-z])/g,(d,l,h)=>h.toUpperCase()),c=async p=>{try{if(customElements.get(p))return{tag:p,status:"already-defined"};let d=a(p),h=await import(d instanceof URL?d.href:new URL(d,s).href),g=h?.default??h?.[n(p)];if(!g){if(customElements.get(p))return{tag:p,status:"self-defined"};throw new Error(`No export found for ${p}. Expected default export or named export "${n(p)}".`)}return customElements.get(p)?{tag:p,status:"race-already-defined"}:(customElements.define(p,g),{tag:p,status:"defined"})}catch(d){throw i(p,d),d}};return Promise.all(t.map(c))}var ct,Zt=br(()=>{ct=class{constructor(e={}){let{baseURL:t,mapper:o,onError:a,predicate:i=()=>!0,attributeModule:s="data-module",root:n=document,scanExisting:c=!0,debounceMs:p=16,observeShadows:d=!0,enhancers:l=[],patchAttachShadow:h=!0}=e,g=new Set,y=new Set,k=new Set,f=new Map,$=new WeakMap,Z=new WeakMap,A=0,H=!1,D=null,le=b=>{if(!b||!l.length)return;let w=Z.get(b);w||(w=new Set,Z.set(b,w));for(let v of l)if(!(!v.selector||!v.run)&&!w.has(v.selector))try{b.matches&&b.matches(v.selector)&&(v.run(b),w.add(v.selector))}catch(L){console.warn(`[AutoDefiner] Error applying enhancer for selector "${v.selector}":`,L)}},Q=(b,w)=>{if(!H&&!(!b||!b.includes("-"))&&!customElements.get(b)&&!y.has(b)&&!k.has(b)){if(w&&w.getAttribute){let v=w.getAttribute(s);v&&!f.has(b)&&f.set(b,v)}g.add(b),xe()}},xe=()=>{A||(A=setTimeout(X,p))},_=b=>{if(b){if(b.nodeType===1){let w=b,v=w.tagName?.toLowerCase();v&&v.includes("-")&&!customElements.get(v)&&i(v,w)&&Q(v,w),le(w),d&&w.shadowRoot&&W(w.shadowRoot)}b.querySelectorAll&&b.querySelectorAll("*").forEach(w=>{let v=w.tagName?.toLowerCase();v&&v.includes("-")&&!customElements.get(v)&&i(v,w)&&Q(v,w),le(w),d&&w.shadowRoot&&W(w.shadowRoot)})}},W=b=>{if(!b||$.has(b))return;_(b);let w=new MutationObserver(v=>{for(let L of v)L.addedNodes?.forEach(ee=>{_(ee)}),L.type==="attributes"&&L.target&&_(L.target)});w.observe(b,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[s,...l.map(v=>v.selector).filter(v=>v.startsWith("data-"))]}),$.set(b,w)};async function X(){if(clearTimeout(A),A=0,!g.size)return;let b=Array.from(g);g.clear(),b.forEach(w=>y.add(w));try{let w=v=>f.get(v)??(o?o(v):`${v}.js`);await ao(...b,{baseURL:t,mapper:w,onError:(v,L)=>{k.add(v),a?.(v,L)}})}catch{}finally{b.forEach(w=>y.delete(w))}}let E=n===document?document.documentElement:n,R=new MutationObserver(b=>{for(let w of b)w.addedNodes?.forEach(v=>{_(v)}),w.type==="attributes"&&w.target&&_(w.target)});if(R.observe(E,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[s,...l.map(b=>b.selector).filter(b=>b.startsWith("data-"))]}),d&&h&&Element.prototype.attachShadow){let b=Element.prototype.attachShadow;Element.prototype.attachShadow=function(v){let L=b.call(this,v);if(v&&v.mode==="open"){W(L);let ee=this.tagName?.toLowerCase();ee&&ee.includes("-")&&!customElements.get(ee)&&Q(ee,this)}return L},D=()=>Element.prototype.attachShadow=b}return c&&_(E),{stop(){H=!0,R.disconnect(),D&&D(),A&&(clearTimeout(A),A=0),$.forEach(b=>b.disconnect())},flush:X}}static async define(...e){let t={};e.length&&typeof e[e.length-1]=="object"&&(t=e.pop()||{});let o=e,{baseURL:a,mapper:i=d=>`${d}.js`,onError:s=(d,l)=>console.error(`[defineWebComponents] ${d}:`,l)}=t,n=a?new URL(a,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),c=d=>d.toLowerCase().replace(/(^|-)([a-z])/g,(l,h,g)=>g.toUpperCase()),p=async d=>{try{if(customElements.get(d))return{tag:d,status:"already-defined"};let l=i(d),g=await import(l instanceof URL?l.href:new URL(l,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(l){throw s(d,l),l}};return Promise.all(o.map(p))}}});var ke=globalThis,$e=ke.ShadowRoot&&(ke.ShadyCSS===void 0||ke.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ft=Symbol(),mt=new WeakMap,Se=class{constructor(e,t,o){if(this._$cssResult$=!0,o!==ft)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($e&&e===void 0){let o=t!==void 0&&t.length===1;o&&(e=mt.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),o&&mt.set(t,e))}return e}toString(){return this.cssText}},bt=r=>new Se(typeof r=="string"?r:r+"",void 0,ft);var yt=(r,e)=>{if($e)r.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of e){let o=document.createElement("style"),a=ke.litNonce;a!==void 0&&o.setAttribute("nonce",a),o.textContent=t.cssText,r.appendChild(o)}},qe=$e?r=>r:r=>r instanceof CSSStyleSheet?(e=>{let t="";for(let o of e.cssRules)t+=o.cssText;return bt(t)})(r):r;var{is:wr,defineProperty:xr,getOwnPropertyDescriptor:kr,getOwnPropertyNames:Sr,getOwnPropertySymbols:$r,getPrototypeOf:Cr}=Object,Ce=globalThis,vt=Ce.trustedTypes,Er=vt?vt.emptyScript:"",Tr=Ce.reactiveElementPolyfillSupport,de=(r,e)=>r,Ge={toAttribute(r,e){switch(e){case Boolean:r=r?Er: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}},xt=(r,e)=>!wr(r,e),wt={attribute:!0,type:String,converter:Ge,reflect:!1,useDefault:!1,hasChanged:xt};Symbol.metadata??=Symbol("metadata"),Ce.litPropertyMetadata??=new WeakMap;var I=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=wt){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 o=Symbol(),a=this.getPropertyDescriptor(e,o,t);a!==void 0&&xr(this.prototype,e,a)}}static getPropertyDescriptor(e,t,o){let{get:a,set:i}=kr(this.prototype,e)??{get(){return this[t]},set(s){this[t]=s}};return{get:a,set(s){let n=a?.call(this);i?.call(this,s),this.requestUpdate(e,n,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??wt}static _$Ei(){if(this.hasOwnProperty(de("elementProperties")))return;let e=Cr(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(de("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(de("properties"))){let t=this.properties,o=[...Sr(t),...$r(t)];for(let a of o)this.createProperty(a,t[a])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[o,a]of t)this.elementProperties.set(o,a)}this._$Eh=new Map;for(let[t,o]of this.elementProperties){let a=this._$Eu(t,o);a!==void 0&&this._$Eh.set(a,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let o=new Set(e.flat(1/0).reverse());for(let a of o)t.unshift(qe(a))}else e!==void 0&&t.push(qe(e));return t}static _$Eu(e,t){let o=t.attribute;return o===!1?void 0:typeof o=="string"?o: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 o of t.keys())this.hasOwnProperty(o)&&(e.set(o,this[o]),delete this[o]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return yt(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,o){this._$AK(e,o)}_$ET(e,t){let o=this.constructor.elementProperties.get(e),a=this.constructor._$Eu(e,o);if(a!==void 0&&o.reflect===!0){let i=(o.converter?.toAttribute!==void 0?o.converter:Ge).toAttribute(t,o.type);this._$Em=e,i==null?this.removeAttribute(a):this.setAttribute(a,i),this._$Em=null}}_$AK(e,t){let o=this.constructor,a=o._$Eh.get(e);if(a!==void 0&&this._$Em!==a){let i=o.getPropertyOptions(a),s=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:Ge;this._$Em=a;let n=s.fromAttribute(t,i.type);this[a]=n??this._$Ej?.get(a)??n,this._$Em=null}}requestUpdate(e,t,o){if(e!==void 0){let a=this.constructor,i=this[e];if(o??=a.getPropertyOptions(e),!((o.hasChanged??xt)(i,t)||o.useDefault&&o.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(a._$Eu(e,o))))return;this.C(e,t,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:o,reflect:a,wrapped:i},s){o&&!(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||o||(t=void 0),this._$AL.set(e,t)),a===!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[a,i]of this._$Ep)this[a]=i;this._$Ep=void 0}let o=this.constructor.elementProperties;if(o.size>0)for(let[a,i]of o){let{wrapped:s}=i,n=this[a];s!==!0||this._$AL.has(a)||n===void 0||this.C(a,void 0,i,n)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(o=>o.hostUpdate?.()),this.update(t)):this._$EM()}catch(o){throw e=!1,this._$EM(),o}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){}};I.elementStyles=[],I.shadowRootOptions={mode:"open"},I[de("elementProperties")]=new Map,I[de("finalized")]=new Map,Tr?.({ReactiveElement:I}),(Ce.reactiveElementVersions??=[]).push("2.1.1");var Je=globalThis,Ee=Je.trustedTypes,kt=Ee?Ee.createPolicy("lit-html",{createHTML:r=>r}):void 0,Ke="$lit$",F=`lit$${Math.random().toFixed(9).slice(2)}$`,Ye="?"+F,Ar=`<${Ye}>`,G=document,ue=()=>G.createComment(""),he=r=>r===null||typeof r!="object"&&typeof r!="function",Ze=Array.isArray,At=r=>Ze(r)||typeof r?.[Symbol.iterator]=="function",Ve=`[
|
|
2
|
-
\f\r]`,pe=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ct=/'/g,Et=/"/g,zt=/^(?:script|style|textarea|title)$/i,Qe=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),Me=Qe(1),Xe=Qe(2),_t=Qe(3),C=Symbol.for("lit-noChange"),x=Symbol.for("lit-nothing"),Tt=new WeakMap,q=G.createTreeWalker(G,129);function Lt(r,e){if(!Ze(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return kt!==void 0?kt.createHTML(e):e}var Mt=(r,e)=>{let t=r.length-1,o=[],a,i=e===2?"<svg>":e===3?"<math>":"",s=pe;for(let n=0;n<t;n++){let c=r[n],p,d,l=-1,h=0;for(;h<c.length&&(s.lastIndex=h,d=s.exec(c),d!==null);)h=s.lastIndex,s===pe?d[1]==="!--"?s=St:d[1]!==void 0?s=$t:d[2]!==void 0?(zt.test(d[2])&&(a=RegExp("</"+d[2],"g")),s=U):d[3]!==void 0&&(s=U):s===U?d[0]===">"?(s=a??pe,l=-1):d[1]===void 0?l=-2:(l=s.lastIndex-d[2].length,p=d[1],s=d[3]===void 0?U:d[3]==='"'?Et:Ct):s===Et||s===Ct?s=U:s===St||s===$t?s=pe:(s=U,a=void 0);let g=s===U&&r[n+1].startsWith("/>")?" ":"";i+=s===pe?c+Ar:l>=0?(o.push(p),c.slice(0,l)+Ke+c.slice(l)+F+g):c+F+(l===-2?n:g)}return[Lt(r,i+(r[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),o]},ge=class r{constructor({strings:e,_$litType$:t},o){let a;this.parts=[];let i=0,s=0,n=e.length-1,c=this.parts,[p,d]=Mt(e,t);if(this.el=r.createElement(p,o),q.currentNode=this.el.content,t===2||t===3){let l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(a=q.nextNode())!==null&&c.length<n;){if(a.nodeType===1){if(a.hasAttributes())for(let l of a.getAttributeNames())if(l.endsWith(Ke)){let h=d[s++],g=a.getAttribute(l).split(F),y=/([.?@])?(.*)/.exec(h);c.push({type:1,index:i,name:y[2],strings:g,ctor:y[1]==="."?Ae:y[1]==="?"?ze:y[1]==="@"?_e:J}),a.removeAttribute(l)}else l.startsWith(F)&&(c.push({type:6,index:i}),a.removeAttribute(l));if(zt.test(a.tagName)){let l=a.textContent.split(F),h=l.length-1;if(h>0){a.textContent=Ee?Ee.emptyScript:"";for(let g=0;g<h;g++)a.append(l[g],ue()),q.nextNode(),c.push({type:2,index:++i});a.append(l[h],ue())}}}else if(a.nodeType===8)if(a.data===Ye)c.push({type:2,index:i});else{let l=-1;for(;(l=a.data.indexOf(F,l+1))!==-1;)c.push({type:7,index:i}),l+=F.length-1}i++}}static createElement(e,t){let o=G.createElement("template");return o.innerHTML=e,o}};function V(r,e,t=r,o){if(e===C)return e;let a=o!==void 0?t._$Co?.[o]:t._$Cl,i=he(e)?void 0:e._$litDirective$;return a?.constructor!==i&&(a?._$AO?.(!1),i===void 0?a=void 0:(a=new i(r),a._$AT(r,t,o)),o!==void 0?(t._$Co??=[])[o]=a:t._$Cl=a),a!==void 0&&(e=V(r,a._$AS(r,e.values),a,o)),e}var Te=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:o}=this._$AD,a=(e?.creationScope??G).importNode(t,!0);q.currentNode=a;let i=q.nextNode(),s=0,n=0,c=o[0];for(;c!==void 0;){if(s===c.index){let p;c.type===2?p=new te(i,i.nextSibling,this,e):c.type===1?p=new c.ctor(i,c.name,c.strings,this,e):c.type===6&&(p=new Le(i,this,e)),this._$AV.push(p),c=o[++n]}s!==c?.index&&(i=q.nextNode(),s++)}return q.currentNode=G,a}p(e){let t=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(e,o,t),t+=o.strings.length-2):o._$AI(e[t])),t++}},te=class r{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,o,a){this.type=2,this._$AH=x,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=o,this.options=a,this._$Cv=a?.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=V(this,e,t),he(e)?e===x||e==null||e===""?(this._$AH!==x&&this._$AR(),this._$AH=x):e!==this._$AH&&e!==C&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):At(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!==x&&he(this._$AH)?this._$AA.nextSibling.data=e:this.T(G.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:o}=e,a=typeof o=="number"?this._$AC(e):(o.el===void 0&&(o.el=ge.createElement(Lt(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===a)this._$AH.p(t);else{let i=new Te(a,this),s=i.u(this.options);i.p(t),this.T(s),this._$AH=i}}_$AC(e){let t=Tt.get(e.strings);return t===void 0&&Tt.set(e.strings,t=new ge(e)),t}k(e){Ze(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,o,a=0;for(let i of e)a===t.length?t.push(o=new r(this.O(ue()),this.O(ue()),this,this.options)):o=t[a],o._$AI(i),a++;a<t.length&&(this._$AR(o&&o._$AB.nextSibling,a),t.length=a)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let o=e.nextSibling;e.remove(),e=o}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},J=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,o,a,i){this.type=1,this._$AH=x,this._$AN=void 0,this.element=e,this.name=t,this._$AM=a,this.options=i,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=x}_$AI(e,t=this,o,a){let i=this.strings,s=!1;if(i===void 0)e=V(this,e,t,0),s=!he(e)||e!==this._$AH&&e!==C,s&&(this._$AH=e);else{let n=e,c,p;for(e=i[0],c=0;c<i.length-1;c++)p=V(this,n[o+c],t,c),p===C&&(p=this._$AH[c]),s||=!he(p)||p!==this._$AH[c],p===x?e=x:e!==x&&(e+=(p??"")+i[c+1]),this._$AH[c]=p}s&&!a&&this.j(e)}j(e){e===x?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Ae=class extends J{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===x?void 0:e}},ze=class extends J{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==x)}},_e=class extends J{constructor(e,t,o,a,i){super(e,t,o,a,i),this.type=5}_$AI(e,t=this){if((e=V(this,e,t,0)??x)===C)return;let o=this._$AH,a=e===x&&o!==x||e.capture!==o.capture||e.once!==o.once||e.passive!==o.passive,i=e!==x&&(o===x||a);a&&this.element.removeEventListener(this.name,this,o),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)}},Le=class{constructor(e,t,o){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(e){V(this,e)}},Dt={M:Ke,P:F,A:Ye,C:1,L:Mt,R:Te,D:At,V,I:te,H:J,N:ze,U:_e,B:Ae,F:Le},zr=Je.litHtmlPolyfillSupport;zr?.(ge,te),(Je.litHtmlVersions??=[]).push("3.3.1");var N=(r,e,t)=>{let o=t?.renderBefore??e,a=o._$litPart$;if(a===void 0){let i=t?.renderBefore??null;o._$litPart$=a=new te(e.insertBefore(ue(),i),i,void 0,t??{})}return a._$AI(r),a};var et=globalThis,M=class extends I{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=N(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return C}};M._$litElement$=!0,M.finalized=!0,et.litElementHydrateSupport?.({LitElement:M});var _r=et.litElementPolyfillSupport;_r?.({LitElement:M});(et.litElementVersions??=[]).push("4.2.1");var B={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},T=r=>(...e)=>({_$litDirective$:r,values:e}),z=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,o){this._$Ct=e,this._$AM=t,this._$Ci=o}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};var{I:Lr}=Dt,Rt=r=>r===null||typeof r!="object"&&typeof r!="function";var It=r=>r.strings===void 0,Pt=()=>document.createComment(""),re=(r,e,t)=>{let o=r._$AA.parentNode,a=e===void 0?r._$AB:e._$AA;if(t===void 0){let i=o.insertBefore(Pt(),a),s=o.insertBefore(Pt(),a);t=new Lr(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!==a||n){let c=t._$AA;for(;c!==i;){let p=c.nextSibling;o.insertBefore(c,a),c=p}}}return t},O=(r,e,t=r)=>(r._$AI(e,t),r),Mr={},De=(r,e=Mr)=>r._$AH=e,Ft=r=>r._$AH,Pe=r=>{r._$AR(),r._$AA.remove()};var Nt=(r,e,t)=>{let o=new Map;for(let a=e;a<=t;a++)o.set(r[a],a);return o},Io=T(class extends z{constructor(r){if(super(r),r.type!==B.CHILD)throw Error("repeat() can only be used in text expressions")}dt(r,e,t){let o;t===void 0?t=e:e!==void 0&&(o=e);let a=[],i=[],s=0;for(let n of r)a[s]=o?o(n,s):s,i[s]=t(n,s),s++;return{values:i,keys:a}}render(r,e,t){return this.dt(r,e,t).values}update(r,[e,t,o]){let a=Ft(r),{values:i,keys:s}=this.dt(e,t,o);if(!Array.isArray(a))return this.ut=s,i;let n=this.ut??=[],c=[],p,d,l=0,h=a.length-1,g=0,y=i.length-1;for(;l<=h&&g<=y;)if(a[l]===null)l++;else if(a[h]===null)h--;else if(n[l]===s[g])c[g]=O(a[l],i[g]),l++,g++;else if(n[h]===s[y])c[y]=O(a[h],i[y]),h--,y--;else if(n[l]===s[y])c[y]=O(a[l],i[y]),re(r,c[y+1],a[l]),l++,y--;else if(n[h]===s[g])c[g]=O(a[h],i[g]),re(r,a[l],a[h]),h--,g++;else if(p===void 0&&(p=Nt(s,g,y),d=Nt(n,l,h)),p.has(n[l]))if(p.has(n[h])){let k=d.get(s[g]),f=k!==void 0?a[k]:null;if(f===null){let $=re(r,a[l]);O($,i[g]),c[g]=$}else c[g]=O(f,i[g]),re(r,a[l],f),a[k]=null;g++}else Pe(a[h]),h--;else Pe(a[l]),l++;for(;g<=y;){let k=re(r,c[y+1]);O(k,i[g]),c[g++]=k}for(;l<=h;){let k=a[l++];k!==null&&Pe(k)}return this.ut=s,De(r,c),C}});var Uo=T(class extends z{constructor(){super(...arguments),this.key=x}render(r,e){return this.key=r,e}update(r,[e,t]){return e!==this.key&&(De(r),this.key=e),t}});var Zo=T(class extends z{constructor(r){if(super(r),r.type!==B.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(o=>o!=="")));for(let o in e)e[o]&&!this.nt?.has(o)&&this.st.add(o);return this.render(e)}let t=r.element.classList;for(let o of this.st)o in e||(t.remove(o),this.st.delete(o));for(let o in e){let a=!!e[o];a===this.st.has(o)||this.nt?.has(o)||(a?(t.add(o),this.st.add(o)):(t.remove(o),this.st.delete(o)))}return C}});var me=(r,e)=>{let t=r._$AN;if(t===void 0)return!1;for(let o of t)o._$AO?.(e,!1),me(o,e);return!0},Re=r=>{let e,t;do{if((e=r._$AM)===void 0)break;t=e._$AN,t.delete(r),r=e}while(t?.size===0)},Bt=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),Rr(e)}};function Dr(r){this._$AN!==void 0?(Re(this),this._$AM=r,Bt(this)):this._$AM=r}function Pr(r,e=!1,t=0){let o=this._$AH,a=this._$AN;if(a!==void 0&&a.size!==0)if(e)if(Array.isArray(o))for(let i=t;i<o.length;i++)me(o[i],!1),Re(o[i]);else o!=null&&(me(o,!1),Re(o));else me(this,r)}var Rr=r=>{r.type==B.CHILD&&(r._$AP??=Pr,r._$AQ??=Dr)},oe=class extends z{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,o){super._$AT(e,t,o),Bt(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(me(this,e),Re(this))}setValue(e){if(It(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 tt=new WeakMap,Ir=T(class extends oe{render(r){return x}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)),x}rt(r){if(this.isConnected||(r=void 0),typeof this.G=="function"){let e=this.ht??globalThis,t=tt.get(e);t===void 0&&(t=new WeakMap,tt.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"?tt.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 Ie=class{constructor(e){this.G=e}disconnect(){this.G=void 0}reconnect(e){this.G=e}deref(){return this.G}},Fe=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 Ot=r=>!Rt(r)&&typeof r.then=="function",jt=1073741823,rt=class extends oe{constructor(){super(...arguments),this._$Cwt=jt,this._$Cbt=[],this._$CK=new Ie(this),this._$CX=new Fe}render(...e){return e.find(t=>!Ot(t))??C}update(e,t){let o=this._$Cbt,a=o.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(!Ot(c))return this._$Cwt=n,c;n<a&&c===o[n]||(this._$Cwt=jt,a=0,Promise.resolve(c).then(async p=>{for(;s.get();)await s.get();let d=i.deref();if(d!==void 0){let l=d._$Cbt.indexOf(c);l>-1&&l<d._$Cwt&&(d._$Cwt=l,d.setValue(p))}}))}return C}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}},Fr=T(rt);var K=class extends z{constructor(e){if(super(e),this.it=x,e.type!==B.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===x||e==null)return this._t=void 0,this.it=e;if(e===C)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:[]}}};K.directiveName="unsafeHTML",K.resultType=1;var Ne=T(K);var fe=class extends K{};fe.directiveName="unsafeSVG",fe.resultType=2;var Nr=T(fe);var Ia=["127.0.0.1","localhost"].includes(window.location.hostname);var Br=Symbol.for(""),Or=r=>{if(r?.r===Br)return r?._$litStatic$};var Ht=new Map,ot=r=>(e,...t)=>{let o=t.length,a,i,s=[],n=[],c,p=0,d=!1;for(;p<o;){for(c=e[p];p<o&&(i=t[p],(a=Or(i))!==void 0);)c+=a+e[++p],d=!0;p!==o&&n.push(i),s.push(c),p++}if(p===o&&s.push(e[o]),d){let l=s.join("$$lit$$");(e=Ht.get(l))===void 0&&(s.raw=s,Ht.set(l,e=s)),t=n}return r(e,...t)},jr=ot(Me),Ba=ot(Xe),Oa=ot(_t);var S=Me;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 j={"ocean-breeze":{id:"ocean-breeze",name:"Ocean Breeze",tags:["playful"],description:"Fresh and calming ocean-inspired palette with professional undertones",options:{liquidGlassEffects:!0,backgroundMesh:3},colors:{primary:"#0891b2",secondary:"#64748b",accent:"#06b6d4",background:"#f0f9ff",darkMode:{background:"#0c1821",secondary:"#94a3b8",primary:"#0891b2"}},typography:{baseFontSize:17,fontScale:1.5,fontFamilyHeadings:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',fontFamilyBody:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif'},spatialRhythm:{baseUnit:6,scaleRatio:1.2},shape:{radiusSize:u.RadiusSizes.xxlarge}},"midnight-steel":{id:"midnight-steel",name:"Midnight Steel",description:"Bold industrial aesthetic with sharp contrasts and urban edge",colors:{primary:"#3b82f6",secondary:"#52525b",accent:"#f59e0b",background:"#fafaf9",darkMode:{background:"#18181b",secondary:"#71717a",primary:"#3b82f6"}},typography:{baseFontSize:16,fontScale:1.333,fontFamilyHeadings:"'IBM Plex Sans', system-ui, -apple-system, sans-serif",fontFamilyBody:"'Inter', system-ui, -apple-system, sans-serif",fontWeightSemibold:600},spatialRhythm:{baseUnit:4,scaleRatio:1.25},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.thin}},"neural-glow":{id:"neural-glow",name:"Neural Glow",description:"AI-inspired with vibrant purple-blue gradients and futuristic vibes",colors:{primary:"#8b5cf6",secondary:"#6366f1",accent:"#ec4899",background:"#faf5ff",darkMode:{background:"#0f0a1a",secondary:"#818cf8",primary:"#8b5cf6"}},typography:{baseFontSize:16,fontScale:1.618,fontFamilyHeadings:"'Space Grotesk', system-ui, sans-serif",fontFamilyBody:"'Space Grotesk', system-ui, sans-serif"},spatialRhythm:{baseUnit:4,scaleRatio:1.5},shape:{radiusSize:u.RadiusSizes.xlarge,borderWidth:u.BorderWidths.medium},behavior:{transitionSpeed:u.TransitionSpeeds.fast}},"paper-and-ink":{id:"paper-and-ink",name:"Paper & Ink",tags:["app","featured"],description:"Ultra-minimal design with focus on typography and whitespace",colors:{primary:"#171717",secondary:"#737373",accent:"#525252",background:"#ffffff",darkMode:{background:"#0a0a0a",secondary:"#a3a3a3",primary:"#737373"}},typography:{baseFontSize:18,fontScale:1.333,fontFamilyHeadings:"'Helvetica Neue', 'Arial', sans-serif",fontFamilyBody:"'Georgia', 'Times New Roman', serif",fontWeightNormal:400,fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.2},shape:{radiusSize:u.RadiusSizes.none,borderWidth:u.BorderWidths.thin}},"sunset-paradise":{id:"sunset-paradise",name:"Sunset Paradise",description:"Warm tropical colors evoking golden hour by the beach",options:{liquidGlassEffects:!0,backgroundMesh:2},colors:{primary:"#ea580c",secondary:"#d4a373",accent:"#fb923c",background:"#fffbeb",darkMode:{background:"#1a0f0a",secondary:"#c9a482",primary:"#f97316"}},typography:{baseFontSize:16,fontScale:1.5,fontFamilyHeadings:"'Quicksand', 'Comfortaa', sans-serif",fontFamilyBody:"'Quicksand', 'Comfortaa', sans-serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.5},shape:{radiusSize:u.RadiusSizes.xxlarge,borderWidth:u.BorderWidths.medium}},"retro-wave":{id:"retro-wave",name:"Retro Wave",description:"Nostalgic 80s-inspired palette with neon undertones",colors:{primary:"#c026d3",secondary:"#a78bfa",accent:"#22d3ee",background:"#fef3ff",darkMode:{background:"#1a0a1f",secondary:"#c4b5fd",primary:"#d946ef"}},typography:{baseFontSize:15,fontScale:1.5,fontFamilyHeadings:"'Orbitron', 'Impact', monospace",fontFamilyBody:"'Courier New', 'Courier', monospace",fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.25},shape:{radiusSize:u.RadiusSizes.none,borderWidth:u.BorderWidths.thick},behavior:{transitionSpeed:u.TransitionSpeeds.instant}},"forest-canopy":{id:"forest-canopy",name:"Forest Canopy",description:"Natural earth tones with organic, calming green hues",colors:{primary:"#059669",secondary:"#78716c",accent:"#84cc16",background:"#f0fdf4",darkMode:{background:"#0a1410",secondary:"#a8a29e",primary:"#10b981"}},typography:{baseFontSize:16,fontScale:1.414,fontFamilyHeadings:"'Merriweather Sans', 'Arial', sans-serif",fontFamilyBody:"'Merriweather', 'Georgia', serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.3},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.thin}},"ruby-elegance":{id:"ruby-elegance",name:"Ruby Elegance",description:"Sophisticated palette with rich ruby reds and warm accents",colors:{primary:"#dc2626",secondary:"#9ca3af",accent:"#be123c",background:"#fef2f2",darkMode:{background:"#1b0808",secondary:"#d1d5db",primary:"#ef4444"}},typography:{baseFontSize:17,fontScale:1.5,fontFamilyHeadings:"'Playfair Display', 'Georgia', serif",fontFamilyBody:"'Crimson Text', 'Garamond', serif",fontWeightNormal:400,fontWeightSemibold:600},spatialRhythm:{baseUnit:4,scaleRatio:1.333},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.thin}},"desert-dawn":{id:"desert-dawn",name:"Desert Dawn",description:"Sun-baked neutrals with grounded terracotta and cool oasis accents",colors:{primary:"#b45309",secondary:"#a8a29e",accent:"#0ea5a8",background:"#fcf6ef",darkMode:{background:"#12100e",secondary:"#d1d5db",primary:"#f59e0b"}},typography:{baseFontSize:16,fontScale:1.414,fontFamilyHeadings:"'Source Sans Pro', system-ui, -apple-system, sans-serif",fontFamilyBody:"'Source Serif Pro', Georgia, serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.3},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.medium}},"contrast-pro":{id:"contrast-pro",name:"Contrast Pro",description:"Accessibility-first, high-contrast UI with assertive clarity",colors:{primary:"#1f2937",secondary:"#111827",accent:"#eab308",background:"#ffffff",darkMode:{background:"#0b0f14",secondary:"#9ca3af",primary:"#9ca3af"}},typography:{baseFontSize:17,fontScale:1.2,fontFamilyHeadings:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontFamilyBody:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontWeightBold:700},spatialRhythm:{baseUnit:3,scaleRatio:1.2},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.thick},behavior:{transitionSpeed:u.TransitionSpeeds.fast,focusRingWidth:4}},"pastel-play":{id:"pastel-play",name:"Pastel Play",description:"Playful pastels with soft surfaces and friendly rounded shapes",colors:{primary:"#db2777",secondary:"#a78bfa",accent:"#34d399",background:"#fff7fa",darkMode:{background:"#1a1016",secondary:"#c4b5fd",primary:"#ec4899"}},typography:{baseFontSize:16,fontScale:1.333,fontFamilyHeadings:"'Nunito', system-ui, -apple-system, sans-serif",fontFamilyBody:"'Nunito', system-ui, -apple-system, sans-serif",lineHeightRelaxed:u.LineHeights.relaxed},spatialRhythm:{baseUnit:6,scaleRatio:1.4},shape:{radiusSize:u.RadiusSizes.xxlarge,borderWidth:u.BorderWidths.thin},behavior:{transitionSpeed:u.TransitionSpeeds.slow,animationEasing:u.AnimationEasings["ease-out"]}},"brutalist-tech":{id:"brutalist-tech",name:"Brutalist Tech",description:"Stark grayscale with engineered accents and unapologetically bold structure",colors:{primary:"#111111",secondary:"#4b5563",accent:"#06b6d4",background:"#f8fafc",darkMode:{background:"#0b0b0b",secondary:"#9ca3af",primary:"#06b6d4"}},typography:{baseFontSize:15,fontScale:1.25,fontFamilyHeadings:"'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace",fontFamilyBody:"'Inter', system-ui, -apple-system, sans-serif",letterSpacingTight:-.02},spatialRhythm:{baseUnit:4,scaleRatio:1.25},shape:{radiusSize:u.RadiusSizes.none,borderWidth:u.BorderWidths.thick},behavior:{transitionSpeed:u.TransitionSpeeds.instant}},"zen-garden":{id:"zen-garden",name:"Zen Garden",description:"Soft botanicals with contemplative spacing and balanced motion",colors:{primary:"#3f6212",secondary:"#6b7280",accent:"#7c3aed",background:"#f7fbef",darkMode:{background:"#0d130a",secondary:"#a3a3a3",primary:"#84cc16"}},typography:{baseFontSize:17,fontScale:1.414,fontFamilyHeadings:"'Merriweather', Georgia, serif",fontFamilyBody:"'Noto Sans', system-ui, -apple-system, sans-serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.35},shape:{radiusSize:u.RadiusSizes.large,borderWidth:u.BorderWidths.medium},behavior:{transitionSpeed:u.TransitionSpeeds.normal,animationEasing:u.AnimationEasings.ease}},"fitness-pro":{id:"fitness-pro",name:"Fitness Pro",tags:["app","featured"],description:"Health and fitness tracking aesthetic with data-driven dark surfaces and vibrant accent rings",options:{liquidGlassEffects:!0,backgroundMesh:2},colors:{primary:"#e91e63",secondary:"#78909c",accent:"#ab47bc",background:"#fafafa",darkMode:{background:"#1a1d21",secondary:"#78909c",primary:"#0a4ca4"}},typography:{baseFontSize:15,fontScale:1.25,fontFamilyHeadings:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightNormal:u.LineHeights.tight},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerPadding:1.25,sectionSpacing:2.5},shape:{radiusSize:u.RadiusSizes.large,borderWidth:u.BorderWidths.thin},layers:{shadowDepth:"medium",blurMedium:12},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-out"],focusRingWidth:2}},"travel-market":{id:"travel-market",name:"Travel Market",description:"Hospitality marketplace design with clean cards, subtle shadows, and trust-building neutrals",options:{liquidGlassEffects:!0,backgroundMesh:3},colors:{primary:"#d93251",secondary:"#717171",accent:"#144990",background:"#ffffff",darkMode:{background:"#222222",secondary:"#b0b0b0",primary:"#ff5a7a"}},typography:{baseFontSize:16,fontScale:1.2,fontFamilyHeadings:"'Circular', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Circular', system-ui, -apple-system, 'Segoe UI', sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightRelaxed:u.LineHeights.relaxed},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:1440,containerPadding:1.5,sectionSpacing:3},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:8},behavior:{transitionSpeed:u.TransitionSpeeds.normal,animationEasing:u.AnimationEasings["ease-in-out"],hoverOpacity:.9}},"mobility-app":{id:"mobility-app",name:"Mobility App",tags:["app","featured"],description:"On-demand service platform with bold typography, map-ready colors, and action-driven UI",options:{liquidGlassEffects:!0,backgroundMesh:0},colors:{primary:"#000000",secondary:"#545454",accent:"#06c167",background:"#f6f6f6",darkMode:{background:"#0f0f0f",secondary:"#8a8a8a",primary:"#06c167"}},typography:{baseFontSize:16,fontScale:1.3,fontFamilyHeadings:"'UberMove', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'UberMove', system-ui, -apple-system, 'Segoe UI', sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.25,buttonPadding:1.25,inputPadding:1},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.medium},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-out"],focusRingWidth:3},a11y:{minTouchTarget:u.TouchTargetSizes.comfortable,focusStyle:u.FocusStyles.ring}},"fintech-secure":{id:"fintech-secure",name:"Fintech Secure",description:"Financial services app UI with trust-building blues, precise spacing, and security-first design",options:{liquidGlassEffects:!1,backgroundMesh:0},colors:{primary:"#0a2540",secondary:"#425466",accent:"#00d4ff",background:"#f7fafc",darkMode:{background:"#0a1929",secondary:"#8796a5",primary:"#00d4ff"}},typography:{baseFontSize:16,fontScale:1.25,fontFamilyHeadings:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyMono:"'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:1280,sectionSpacing:2.5},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:6},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-in-out"],focusRingWidth:3,focusRingOpacity:.4},a11y:{minTouchTarget:u.TouchTargetSizes.standard,focusStyle:u.FocusStyles.ring}},"social-feed":{id:"social-feed",name:"Social Feed",tags:["app","featured"],description:"Content-first social platform with minimal chrome, bold actions, and vibrant media presentation",options:{liquidGlassEffects:!0,backgroundMesh:4},colors:{primary:"#1877f2",secondary:"#65676b",accent:"#fe2c55",background:"#ffffff",darkMode:{background:"#18191a",secondary:"#b0b3b8",primary:"#2d88ff"}},typography:{baseFontSize:15,fontScale:1.2,fontFamilyHeadings:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontFamilyBody:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightNormal:u.LineHeights.relaxed},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:680,sectionSpacing:1.5},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.thin},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-out"],hoverOpacity:.85}},"enterprise-dash":{id:"enterprise-dash",tags:["app","featured"],name:"Enterprise Dashboard",description:"Data-dense business intelligence app interface with organized hierarchy and professional polish",options:{liquidGlassEffects:!1},colors:{primary:"#0066cc",secondary:"#5f6368",accent:"#1a73e8",background:"#ffffff",success:"#34a853",warning:"#fbbc04",danger:"#ea4335",darkMode:{background:"#202124",secondary:"#9aa0a6",primary:"#8ab4f8"}},typography:{baseFontSize:14,fontScale:1.2,fontFamilyHeadings:"'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyMono:"'Roboto Mono', ui-monospace, Consolas, monospace",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightNormal:u.LineHeights.tight},spatialRhythm:{baseUnit:4,scaleRatio:1.2,containerMaxWidth:1600,containerPadding:1.5,sectionSpacing:2},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:4},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-in-out"],focusRingWidth:2},layout:{densityCompact:.85,gridColumns:12}}};j.default={id:"default",name:"Default",tags:["app","featured"],description:"Fresh and modern design system with balanced aesthetics and usability",options:{liquidGlassEffects:!0,backgroundMesh:4},form:{options:{widgets:{booleans:"toggle",numbers:"input",selects:"standard"},layouts:{fieldsets:"default",arrays:"default"},enhancements:{icons:!0,datalists:!0,rangeOutput:!0},validation:{showErrors:!0,validateOnChange:!1}}},colors:{primary:"#0e7490",secondary:"#a99b95",accent:"#e54271",background:"#e7e6de",darkMode:{background:"#16171a",secondary:"#8b9199",primary:"#06b6d4"},success:null,warning:"#B38600",danger:null,info:null,gradientStops:3,elevationOpacity:.05},typography:{baseFontSize:16,fontScale:1.2,fontFamilyHeadings:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',fontFamilyBody:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',fontFamilyMono:'ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace',fontWeightLight:u.FontWeights.light,fontWeightNormal:u.FontWeights.normal,fontWeightMedium:u.FontWeights.medium,fontWeightSemibold:u.FontWeights.semibold,fontWeightBold:u.FontWeights.bold,lineHeightTight:u.LineHeights.tight,lineHeightNormal:u.LineHeights.normal,lineHeightRelaxed:u.LineHeights.relaxed,letterSpacingTight:-.025,letterSpacingNormal:0,letterSpacingWide:.025},spatialRhythm:{baseUnit:4,scaleRatio:1.25,maxSpacingSteps:32,containerMaxWidth:1200,containerPadding:1,inputPadding:.75,buttonPadding:1,sectionSpacing:2},layers:{shadowDepth:"medium",blurLight:4,blurMedium:8,blurHeavy:16,zIndexBase:0,zIndexDropdown:1e3,zIndexSticky:1020,zIndexFixed:1030,zIndexModal:1040,zIndexPopover:1050,zIndexTooltip:1060,zIndexNotification:1070},shape:{radiusSize:u.RadiusSizes.large,borderWidth:u.BorderWidths.medium,customRadius:null},behavior:{transitionSpeed:u.TransitionSpeeds.normal,animationEasing:u.AnimationEasings["ease-out"],customTransitionSpeed:null,customEasing:null,focusRingWidth:3,focusRingOpacity:.3,hoverOpacity:.8},layout:{gridColumns:12,gridGutter:1,breakpoints:{sm:640,md:768,lg:1024,xl:1280},densityCompact:.8,densityNormal:1,densityComfortable:1.2,buttonMinHeight:u.TouchTargetSizes.standard,inputMinHeight:40,utilities:{grid:!0,flex:!0,spacing:!0,container:!0},gridSystem:{columns:[1,2,3,4,6],autoFitBreakpoints:{sm:"150px",md:"250px",lg:"350px",xl:"450px"},enableGapUtilities:!0},containerMaxWidth:"1400px",containerPadding:"var(--spacing-6)"},advanced:{linkStyle:u.LinkStyles.inline,colorDerivation:"hsl"},a11y:{minTouchTarget:u.TouchTargetSizes.standard,prefersReducedMotion:!0,focusStyle:u.FocusStyles.ring},icons:{set:"phosphor",weight:"regular",defaultSize:24,externalPath:"/assets/img/icons/",sizes:{xs:16,sm:20,md:24,lg:32,xl:48,"2xl":64},include:{navigation:["arrow-left","arrow-right","arrow-up","arrow-down","arrow-counter-clockwise","caret-left","caret-right","caret-down","caret-up","x","list","list-dashes","dots-three-vertical","dots-three","house","gear","magnifying-glass","funnel","tabs","sidebar"],actions:["plus","minus","check","trash","pencil","floppy-disk","copy","download","upload","share","link","eye","eye-slash","heart","star","bookmark","note-pencil","cursor-click","clipboard","magic-wand","sparkle"],communication:["envelope","bell","bell-ringing","bell-simple","chat-circle","phone","paper-plane-tilt","user","users","user-gear","at"],content:["image","file","file-text","file-css","file-js","folder","folder-open","book-open","camera","video-camera","play","pause","microphone","brackets-curly","code","folder-simple","grid-four","briefcase","chart-line","chart-bar","database","map-pin"],status:["info","warning","check-circle","x-circle","question","shield","shield-check","shield-warning","lock","lock-open","fingerprint","circle-notch"],time:["calendar","clock","timer","hourglass"],commerce:["shopping-cart","credit-card","currency-dollar","tag","receipt","storefront"],formatting:["text-align-left","text-align-center","text-align-right","text-b","text-italic","text-underline","list-bullets","list-numbers","text-aa"],system:["cloud","cloud-arrow-up","cloud-arrow-down","desktop","device-mobile","globe","wifi-high","battery-charging","sun","moon","moon-stars","palette","rocket","feather","square","circle","squares-four","lightning","wrench"]},spritePath:"public/assets/pds/icons/pds-icons.svg"},gap:4,debug:!1};var at={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"]}};var ae=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.#L(e.shape||{}),typography:this.generateTypographyTokens(e.typography||{}),shadows:this.#M(e.layers||{}),layout:this.#D(e.layout||{}),transitions:this.#P(e.behavior||{}),zIndex:this.#R(e.layers||{}),icons:this.#I(e.icons||{})}}#s(e){let{primary:t="#3b82f6",secondary:o="#64748b",accent:a="#ec4899",background:i="#ffffff",success:s=null,warning:n="#FFBF00",danger:c=null,info:p=null,darkMode:d={}}=e,l={primary:this.#o(t),secondary:this.#o(o),accent:this.#o(a),success:this.#o(s||this.#w(t)),warning:this.#o(n||a),danger:this.#o(c||this.#x(t)),info:this.#o(p||t),gray:this.#u(o),surface:this.#h(i)};return l.surface.fieldset=this.#k(l.surface),l.surfaceSmart=this.#y(l.surface),l.dark=this.#$(l,i,d),l.dark&&l.dark.surface&&(l.dark.surfaceSmart=this.#y(l.dark.surface)),l.interactive={light:{fill:this.#b(l.primary,4.5),text:l.primary[600]},dark:{fill:this.#b(l.dark.primary,4.5),text:this.#A(l.dark.primary,l.dark.surface.base,4.5)}},l}#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),o=t.h,a=Math.min(t.s,10);return{50:this.#t(o,a,98),100:this.#t(o,a,95),200:this.#t(o,a,88),300:this.#t(o,a,78),400:this.#t(o,a,60),500:e,600:this.#t(o,Math.min(a+5,15),45),700:this.#t(o,Math.min(a+8,18),35),800:this.#t(o,Math.min(a+10,20),20),900:this.#t(o,Math.min(a+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 o=this.#i(e),a=Math.max(o.l-o.l*t,5);return this.#t(o.h,o.s,a)}#g(e){let t=this.#i(e);if(t.l>50){let o=Math.min(t.s+5,25),a=Math.max(12-(t.l-50)*.1,8);return this.#t(t.h,o,a)}else{let o=Math.max(t.s-10,5),a=Math.min(85+(50-t.l)*.3,95);return this.#t(t.h,o,a)}}#$(e,t="#ffffff",o={}){let a=o.background?o.background:this.#g(t),i=this.#h(a),s=o.primary?this.#o(o.primary):this.#n(e.primary);return{surface:{...i,fieldset:this.#T(i)},primary:s,secondary:o.secondary?this.#o(o.secondary):this.#n(e.secondary),accent:o.accent?this.#o(o.accent):this.#n(e.accent),gray:o.secondary?this.#u(o.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("#",""),o=t.length===3?t.split("").map(i=>i+i).join(""):t,a=parseInt(o,16);return{r:a>>16&255,g:a>>8&255,b:a&255}}#p(e){let{r:t,g:o,b:a}=this.#l(e),i=[t/255,o/255,a/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 o=this.#p(e),a=this.#p(t),i=Math.max(o,a),s=Math.min(o,a);return(i+.05)/(s+.05)}#m(e,t=4.5){if(!e)return"#000000";let o="#ffffff",a="#000000",i=this.#d(e,o);if(i>=t)return o;let s=this.#d(e,a);return s>=t||s>i?a:o}#f(e,t=1){let{r:o,g:a,b:i}=this.#l(e);return`rgba(${o}, ${a}, ${i}, ${t})`}#C(e,t,o=.5){let a=this.#l(e),i=this.#l(t),s=Math.round(a.r+(i.r-a.r)*o),n=Math.round(a.g+(i.g-a.g)*o),c=Math.round(a.b+(i.b-a.b)*o);return this.#E(s,n,c)}#E(e,t,o){let a=i=>{let s=Math.max(0,Math.min(255,Math.round(i))).toString(16);return s.length===1?"0"+s:s};return`#${a(e)}${a(t)}${a(o)}`}#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",o=4.5){let a=["600","700","800","500","400","900","300","200"],i={shade:null,color:null,ratio:0};for(let s of a){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>=o)return n}return i.color||e?.["600"]||e?.["500"]}#b(e={},t=4.5){let o=["600","700","800","500","400","900"],a={shade:null,color:null,ratio:0};for(let i of o){let s=e?.[i];if(!s||typeof s!="string")continue;let n=this.#d(s,"#ffffff");if(n>a.ratio&&(a={shade:i,color:s,ratio:n}),n>=t)return s}return a.color||e?.["600"]||e?.["500"]}#y(e){let t={};return Object.entries(e).forEach(([o,a])=>{if(!a||typeof a!="string"||!a.startsWith("#"))return;let i=this.#p(a)<.5,s=this.#m(a,4.5),n=this.#m(a,3),c=this.#C(s,a,.4),p=s,d=c,l=i?"#ffffff":"#000000",h=i?.25:.1,g=this.#f(l,h),y=i?"#ffffff":"#000000",k=i?.15:.1,f=this.#f(y,k);t[o]={bg:a,text:s,textSecondary:n,textMuted:c,icon:p,iconSubtle:d,shadow:g,border:f,scheme:i?"dark":"light"}}),t}#v(e,t=.05){let o=this.#i(e),a=Math.min(o.l+(100-o.l)*t,95);return this.#t(o.h,o.s,a)}#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(([a,i])=>{let s=e[i.source];t[a]=this.#z(s,i.dimFactor)}),t}#z(e,t=.8){let o=this.#i(e),a=Math.max(o.s*t,5),i=Math.max(o.l*t,5);return this.#t(o.h,a,i)}generateSpacingTokens(e){let{baseUnit:t=4,scaleRatio:o=1.25,maxSpacingSteps:a=12}=e,i=Number.isFinite(Number(t))?Number(t):4,s=Math.min(Number.isFinite(Number(a))?Number(a):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:o=null}=e,a;o!=null?a=o:typeof t=="number"?a=t:typeof t=="string"?a=u.RadiusSizes[t]??u.RadiusSizes.medium:a=u.RadiusSizes.medium;let i=Number.isFinite(Number(a))?Number(a):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"}}#L(e){let{borderWidth:t="medium"}=e,o;return typeof t=="number"?o=t:typeof t=="string"?o=u.BorderWidths[t]??u.BorderWidths.medium:o=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:o="system-ui, -apple-system, sans-serif",fontFamilyMono:a='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:p=u.FontWeights.medium,fontWeightSemibold:d=u.FontWeights.semibold,fontWeightBold:l=u.FontWeights.bold,lineHeightTight:h=u.LineHeights.tight,lineHeightNormal:g=u.LineHeights.normal,lineHeightRelaxed:y=u.LineHeights.relaxed}=e,k=Number.isFinite(Number(i))?Number(i):16,f=Number.isFinite(Number(s))?Number(s):1.25;return{fontFamily:{headings:t,body:o,mono:a},fontSize:{xs:`${Math.round(k/Math.pow(f,2))}px`,sm:`${Math.round(k/f)}px`,base:`${k}px`,lg:`${Math.round(k*f)}px`,xl:`${Math.round(k*Math.pow(f,2))}px`,"2xl":`${Math.round(k*Math.pow(f,3))}px`,"3xl":`${Math.round(k*Math.pow(f,4))}px`,"4xl":`${Math.round(k*Math.pow(f,5))}px`},fontWeight:{light:n?.toString()||"300",normal:c?.toString()||"400",medium:p?.toString()||"500",semibold:d?.toString()||"600",bold:l?.toString()||"700"},lineHeight:{tight:h?.toString()||"1.25",normal:g?.toString()||"1.5",relaxed:y?.toString()||"1.75"}}}#M(e){let{baseShadowOpacity:t=.1,shadowBlurMultiplier:o=1,shadowOffsetMultiplier:a=1}=e,i=`rgba(0, 0, 0, ${t})`,s=`rgba(0, 0, 0, ${t*.5})`;return{sm:`0 ${1*a}px ${2*o}px 0 ${s}`,base:`0 ${1*a}px ${3*o}px 0 ${i}, 0 ${1*a}px ${2*o}px 0 ${s}`,md:`0 ${4*a}px ${6*o}px ${-1*a}px ${i}, 0 ${2*a}px ${4*o}px ${-1*a}px ${s}`,lg:`0 ${10*a}px ${15*o}px ${-3*a}px ${i}, 0 ${4*a}px ${6*o}px ${-2*a}px ${s}`,xl:`0 ${20*a}px ${25*o}px ${-5*a}px ${i}, 0 ${10*a}px ${10*o}px ${-5*a}px ${s}`,inner:`inset 0 ${2*a}px ${4*o}px 0 ${s}`}}#D(e){let{maxWidth:t=1200,containerPadding:o=16,breakpoints:a={sm:640,md:768,lg:1024,xl:1280}}=e;return{maxWidth:`${t}px`,minHeight:"100vh",containerPadding:`${o}px`,breakpoints:{sm:`${a.sm}px`,md:`${a.md}px`,lg:`${a.lg}px`,xl:`${a.xl}px`},pageMargin:"120px",sectionGap:"160px",containerGap:"200px",heroSpacing:"240px",footerSpacing:"160px"}}#P(e){let{transitionSpeed:t=u.TransitionSpeeds.normal,animationEasing:o=u.AnimationEasings["ease-out"]}=e,a;return typeof t=="number"?a=t:typeof t=="string"&&u.TransitionSpeeds[t]?a=u.TransitionSpeeds[t]:a=u.TransitionSpeeds.normal,{fast:`${Math.round(a*.6)}ms`,normal:`${a}ms`,slow:`${Math.round(a*1.4)}ms`}}#R(e){let{baseZIndex:t=1e3,zIndexStep:o=10}=e;return{dropdown:t.toString(),sticky:(t+o*2).toString(),fixed:(t+o*3).toString(),modal:(t+o*4).toString(),drawer:(t+o*5).toString(),popover:(t+o*6).toString(),tooltip:(t+o*7).toString(),notification:(t+o*8).toString()}}#I(e){let{set:t="phosphor",weight:o="regular",defaultSize:a=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:o,defaultSize:`${a}px`,sizes:Object.fromEntries(Object.entries(i).map(([c,p])=>[c,`${p}px`])),spritePath:s,externalPath:n}}#F(e){let t=[];t.push(` /* Colors */
|
|
1
|
+
var yr=Object.defineProperty;var vr=(r,e)=>()=>(r&&(e=r(r=0)),e);var wr=(r,e)=>{for(var t in e)yr(r,t,{get:e[t],enumerable:!0})};var Xt={};wr(Xt,{AutoDefiner:()=>ct});async function so(...r){let e={};r.length&&typeof r[r.length-1]=="object"&&(e=r.pop()||{});let t=r,{baseURL:o,mapper:a=p=>`${p}.js`,onError:i=(p,d)=>console.error(`[defineWebComponents] ${p}:`,d)}=e,s=o?new URL(o,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),n=p=>p.toLowerCase().replace(/(^|-)([a-z])/g,(d,l,h)=>h.toUpperCase()),c=async p=>{try{if(customElements.get(p))return{tag:p,status:"already-defined"};let d=a(p),h=await import(d instanceof URL?d.href:new URL(d,s).href),g=h?.default??h?.[n(p)];if(!g){if(customElements.get(p))return{tag:p,status:"self-defined"};throw new Error(`No export found for ${p}. Expected default export or named export "${n(p)}".`)}return customElements.get(p)?{tag:p,status:"race-already-defined"}:(customElements.define(p,g),{tag:p,status:"defined"})}catch(d){throw i(p,d),d}};return Promise.all(t.map(c))}var ct,er=vr(()=>{ct=class{constructor(e={}){let{baseURL:t,mapper:o,onError:a,predicate:i=()=>!0,attributeModule:s="data-module",root:n=document,scanExisting:c=!0,debounceMs:p=16,observeShadows:d=!0,enhancers:l=[],patchAttachShadow:h=!0}=e,g=new Set,y=new Set,k=new Set,f=new Map,$=new WeakMap,Z=new WeakMap,A=0,H=!1,D=null,le=b=>{if(!b||!l.length)return;let w=Z.get(b);w||(w=new Set,Z.set(b,w));for(let v of l)if(!(!v.selector||!v.run)&&!w.has(v.selector))try{b.matches&&b.matches(v.selector)&&(v.run(b),w.add(v.selector))}catch(_){console.warn(`[AutoDefiner] Error applying enhancer for selector "${v.selector}":`,_)}},Q=(b,w)=>{if(!H&&!(!b||!b.includes("-"))&&!customElements.get(b)&&!y.has(b)&&!k.has(b)){if(w&&w.getAttribute){let v=w.getAttribute(s);v&&!f.has(b)&&f.set(b,v)}g.add(b),we()}},we=()=>{A||(A=setTimeout(X,p))},L=b=>{if(b){if(b.nodeType===1){let w=b,v=w.tagName?.toLowerCase();v&&v.includes("-")&&!customElements.get(v)&&i(v,w)&&Q(v,w),le(w),d&&w.shadowRoot&&W(w.shadowRoot)}b.querySelectorAll&&b.querySelectorAll("*").forEach(w=>{let v=w.tagName?.toLowerCase();v&&v.includes("-")&&!customElements.get(v)&&i(v,w)&&Q(v,w),le(w),d&&w.shadowRoot&&W(w.shadowRoot)})}},W=b=>{if(!b||$.has(b))return;L(b);let w=new MutationObserver(v=>{for(let _ of v)_.addedNodes?.forEach(ee=>{L(ee)}),_.type==="attributes"&&_.target&&L(_.target)});w.observe(b,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[s,...l.map(v=>v.selector).filter(v=>v.startsWith("data-"))]}),$.set(b,w)};async function X(){if(clearTimeout(A),A=0,!g.size)return;let b=Array.from(g);g.clear(),b.forEach(w=>y.add(w));try{let w=v=>f.get(v)??(o?o(v):`${v}.js`);await so(...b,{baseURL:t,mapper:w,onError:(v,_)=>{k.add(v),a?.(v,_)}})}catch{}finally{b.forEach(w=>y.delete(w))}}let E=n===document?document.documentElement:n,R=new MutationObserver(b=>{for(let w of b)w.addedNodes?.forEach(v=>{L(v)}),w.type==="attributes"&&w.target&&L(w.target)});if(R.observe(E,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[s,...l.map(b=>b.selector).filter(b=>b.startsWith("data-"))]}),d&&h&&Element.prototype.attachShadow){let b=Element.prototype.attachShadow;Element.prototype.attachShadow=function(v){let _=b.call(this,v);if(v&&v.mode==="open"){W(_);let ee=this.tagName?.toLowerCase();ee&&ee.includes("-")&&!customElements.get(ee)&&Q(ee,this)}return _},D=()=>Element.prototype.attachShadow=b}return c&&L(E),{stop(){H=!0,R.disconnect(),D&&D(),A&&(clearTimeout(A),A=0),$.forEach(b=>b.disconnect())},flush:X}}static async define(...e){let t={};e.length&&typeof e[e.length-1]=="object"&&(t=e.pop()||{});let o=e,{baseURL:a,mapper:i=d=>`${d}.js`,onError:s=(d,l)=>console.error(`[defineWebComponents] ${d}:`,l)}=t,n=a?new URL(a,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),c=d=>d.toLowerCase().replace(/(^|-)([a-z])/g,(l,h,g)=>g.toUpperCase()),p=async d=>{try{if(customElements.get(d))return{tag:d,status:"already-defined"};let l=i(d),g=await import(l instanceof URL?l.href:new URL(l,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(l){throw s(d,l),l}};return Promise.all(o.map(p))}}});var xe=globalThis,Se=xe.ShadowRoot&&(xe.ShadyCSS===void 0||xe.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,vt=Symbol(),yt=new WeakMap,ke=class{constructor(e,t,o){if(this._$cssResult$=!0,o!==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(Se&&e===void 0){let o=t!==void 0&&t.length===1;o&&(e=yt.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),o&&yt.set(t,e))}return e}toString(){return this.cssText}},wt=r=>new ke(typeof r=="string"?r:r+"",void 0,vt);var xt=(r,e)=>{if(Se)r.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of e){let o=document.createElement("style"),a=xe.litNonce;a!==void 0&&o.setAttribute("nonce",a),o.textContent=t.cssText,r.appendChild(o)}},qe=Se?r=>r:r=>r instanceof CSSStyleSheet?(e=>{let t="";for(let o of e.cssRules)t+=o.cssText;return wt(t)})(r):r;var{is:kr,defineProperty:Sr,getOwnPropertyDescriptor:$r,getOwnPropertyNames:Cr,getOwnPropertySymbols:Er,getPrototypeOf:Tr}=Object,$e=globalThis,kt=$e.trustedTypes,Ar=kt?kt.emptyScript:"",zr=$e.reactiveElementPolyfillSupport,de=(r,e)=>r,Ge={toAttribute(r,e){switch(e){case Boolean:r=r?Ar: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)=>!kr(r,e),St={attribute:!0,type:String,converter:Ge,reflect:!1,useDefault:!1,hasChanged:$t};Symbol.metadata??=Symbol("metadata"),$e.litPropertyMetadata??=new WeakMap;var F=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 o=Symbol(),a=this.getPropertyDescriptor(e,o,t);a!==void 0&&Sr(this.prototype,e,a)}}static getPropertyDescriptor(e,t,o){let{get:a,set:i}=$r(this.prototype,e)??{get(){return this[t]},set(s){this[t]=s}};return{get:a,set(s){let n=a?.call(this);i?.call(this,s),this.requestUpdate(e,n,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??St}static _$Ei(){if(this.hasOwnProperty(de("elementProperties")))return;let e=Tr(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(de("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(de("properties"))){let t=this.properties,o=[...Cr(t),...Er(t)];for(let a of o)this.createProperty(a,t[a])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[o,a]of t)this.elementProperties.set(o,a)}this._$Eh=new Map;for(let[t,o]of this.elementProperties){let a=this._$Eu(t,o);a!==void 0&&this._$Eh.set(a,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let o=new Set(e.flat(1/0).reverse());for(let a of o)t.unshift(qe(a))}else e!==void 0&&t.push(qe(e));return t}static _$Eu(e,t){let o=t.attribute;return o===!1?void 0:typeof o=="string"?o: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 o of t.keys())this.hasOwnProperty(o)&&(e.set(o,this[o]),delete this[o]);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,o){this._$AK(e,o)}_$ET(e,t){let o=this.constructor.elementProperties.get(e),a=this.constructor._$Eu(e,o);if(a!==void 0&&o.reflect===!0){let i=(o.converter?.toAttribute!==void 0?o.converter:Ge).toAttribute(t,o.type);this._$Em=e,i==null?this.removeAttribute(a):this.setAttribute(a,i),this._$Em=null}}_$AK(e,t){let o=this.constructor,a=o._$Eh.get(e);if(a!==void 0&&this._$Em!==a){let i=o.getPropertyOptions(a),s=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:Ge;this._$Em=a;let n=s.fromAttribute(t,i.type);this[a]=n??this._$Ej?.get(a)??n,this._$Em=null}}requestUpdate(e,t,o){if(e!==void 0){let a=this.constructor,i=this[e];if(o??=a.getPropertyOptions(e),!((o.hasChanged??$t)(i,t)||o.useDefault&&o.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(a._$Eu(e,o))))return;this.C(e,t,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:o,reflect:a,wrapped:i},s){o&&!(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||o||(t=void 0),this._$AL.set(e,t)),a===!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[a,i]of this._$Ep)this[a]=i;this._$Ep=void 0}let o=this.constructor.elementProperties;if(o.size>0)for(let[a,i]of o){let{wrapped:s}=i,n=this[a];s!==!0||this._$AL.has(a)||n===void 0||this.C(a,void 0,i,n)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(o=>o.hostUpdate?.()),this.update(t)):this._$EM()}catch(o){throw e=!1,this._$EM(),o}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){}};F.elementStyles=[],F.shadowRootOptions={mode:"open"},F[de("elementProperties")]=new Map,F[de("finalized")]=new Map,zr?.({ReactiveElement:F}),($e.reactiveElementVersions??=[]).push("2.1.1");var Je=globalThis,Ce=Je.trustedTypes,Ct=Ce?Ce.createPolicy("lit-html",{createHTML:r=>r}):void 0,Ke="$lit$",I=`lit$${Math.random().toFixed(9).slice(2)}$`,Ye="?"+I,Lr=`<${Ye}>`,G=document,ue=()=>G.createComment(""),he=r=>r===null||typeof r!="object"&&typeof r!="function",Ze=Array.isArray,_t=r=>Ze(r)||typeof r?.[Symbol.iterator]=="function",Ve=`[
|
|
2
|
+
\f\r]`,pe=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Et=/-->/g,Tt=/>/g,U=RegExp(`>|${Ve}(?:([^\\s"'>=/]+)(${Ve}*=${Ve}*(?:[^
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),At=/'/g,zt=/"/g,Mt=/^(?:script|style|textarea|title)$/i,Qe=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),_e=Qe(1),Xe=Qe(2),Dt=Qe(3),C=Symbol.for("lit-noChange"),x=Symbol.for("lit-nothing"),Lt=new WeakMap,q=G.createTreeWalker(G,129);function Pt(r,e){if(!Ze(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,o=[],a,i=e===2?"<svg>":e===3?"<math>":"",s=pe;for(let n=0;n<t;n++){let c=r[n],p,d,l=-1,h=0;for(;h<c.length&&(s.lastIndex=h,d=s.exec(c),d!==null);)h=s.lastIndex,s===pe?d[1]==="!--"?s=Et:d[1]!==void 0?s=Tt:d[2]!==void 0?(Mt.test(d[2])&&(a=RegExp("</"+d[2],"g")),s=U):d[3]!==void 0&&(s=U):s===U?d[0]===">"?(s=a??pe,l=-1):d[1]===void 0?l=-2:(l=s.lastIndex-d[2].length,p=d[1],s=d[3]===void 0?U:d[3]==='"'?zt:At):s===zt||s===At?s=U:s===Et||s===Tt?s=pe:(s=U,a=void 0);let g=s===U&&r[n+1].startsWith("/>")?" ":"";i+=s===pe?c+Lr:l>=0?(o.push(p),c.slice(0,l)+Ke+c.slice(l)+I+g):c+I+(l===-2?n:g)}return[Pt(r,i+(r[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),o]},ge=class r{constructor({strings:e,_$litType$:t},o){let a;this.parts=[];let i=0,s=0,n=e.length-1,c=this.parts,[p,d]=Rt(e,t);if(this.el=r.createElement(p,o),q.currentNode=this.el.content,t===2||t===3){let l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(a=q.nextNode())!==null&&c.length<n;){if(a.nodeType===1){if(a.hasAttributes())for(let l of a.getAttributeNames())if(l.endsWith(Ke)){let h=d[s++],g=a.getAttribute(l).split(I),y=/([.?@])?(.*)/.exec(h);c.push({type:1,index:i,name:y[2],strings:g,ctor:y[1]==="."?Te:y[1]==="?"?Ae:y[1]==="@"?ze:J}),a.removeAttribute(l)}else l.startsWith(I)&&(c.push({type:6,index:i}),a.removeAttribute(l));if(Mt.test(a.tagName)){let l=a.textContent.split(I),h=l.length-1;if(h>0){a.textContent=Ce?Ce.emptyScript:"";for(let g=0;g<h;g++)a.append(l[g],ue()),q.nextNode(),c.push({type:2,index:++i});a.append(l[h],ue())}}}else if(a.nodeType===8)if(a.data===Ye)c.push({type:2,index:i});else{let l=-1;for(;(l=a.data.indexOf(I,l+1))!==-1;)c.push({type:7,index:i}),l+=I.length-1}i++}}static createElement(e,t){let o=G.createElement("template");return o.innerHTML=e,o}};function V(r,e,t=r,o){if(e===C)return e;let a=o!==void 0?t._$Co?.[o]:t._$Cl,i=he(e)?void 0:e._$litDirective$;return a?.constructor!==i&&(a?._$AO?.(!1),i===void 0?a=void 0:(a=new i(r),a._$AT(r,t,o)),o!==void 0?(t._$Co??=[])[o]=a:t._$Cl=a),a!==void 0&&(e=V(r,a._$AS(r,e.values),a,o)),e}var Ee=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:o}=this._$AD,a=(e?.creationScope??G).importNode(t,!0);q.currentNode=a;let i=q.nextNode(),s=0,n=0,c=o[0];for(;c!==void 0;){if(s===c.index){let p;c.type===2?p=new te(i,i.nextSibling,this,e):c.type===1?p=new c.ctor(i,c.name,c.strings,this,e):c.type===6&&(p=new Le(i,this,e)),this._$AV.push(p),c=o[++n]}s!==c?.index&&(i=q.nextNode(),s++)}return q.currentNode=G,a}p(e){let t=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(e,o,t),t+=o.strings.length-2):o._$AI(e[t])),t++}},te=class r{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,o,a){this.type=2,this._$AH=x,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=o,this.options=a,this._$Cv=a?.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=V(this,e,t),he(e)?e===x||e==null||e===""?(this._$AH!==x&&this._$AR(),this._$AH=x):e!==this._$AH&&e!==C&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):_t(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!==x&&he(this._$AH)?this._$AA.nextSibling.data=e:this.T(G.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:o}=e,a=typeof o=="number"?this._$AC(e):(o.el===void 0&&(o.el=ge.createElement(Pt(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===a)this._$AH.p(t);else{let i=new Ee(a,this),s=i.u(this.options);i.p(t),this.T(s),this._$AH=i}}_$AC(e){let t=Lt.get(e.strings);return t===void 0&&Lt.set(e.strings,t=new ge(e)),t}k(e){Ze(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,o,a=0;for(let i of e)a===t.length?t.push(o=new r(this.O(ue()),this.O(ue()),this,this.options)):o=t[a],o._$AI(i),a++;a<t.length&&(this._$AR(o&&o._$AB.nextSibling,a),t.length=a)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let o=e.nextSibling;e.remove(),e=o}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},J=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,o,a,i){this.type=1,this._$AH=x,this._$AN=void 0,this.element=e,this.name=t,this._$AM=a,this.options=i,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=x}_$AI(e,t=this,o,a){let i=this.strings,s=!1;if(i===void 0)e=V(this,e,t,0),s=!he(e)||e!==this._$AH&&e!==C,s&&(this._$AH=e);else{let n=e,c,p;for(e=i[0],c=0;c<i.length-1;c++)p=V(this,n[o+c],t,c),p===C&&(p=this._$AH[c]),s||=!he(p)||p!==this._$AH[c],p===x?e=x:e!==x&&(e+=(p??"")+i[c+1]),this._$AH[c]=p}s&&!a&&this.j(e)}j(e){e===x?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Te=class extends J{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===x?void 0:e}},Ae=class extends J{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==x)}},ze=class extends J{constructor(e,t,o,a,i){super(e,t,o,a,i),this.type=5}_$AI(e,t=this){if((e=V(this,e,t,0)??x)===C)return;let o=this._$AH,a=e===x&&o!==x||e.capture!==o.capture||e.once!==o.once||e.passive!==o.passive,i=e!==x&&(o===x||a);a&&this.element.removeEventListener(this.name,this,o),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)}},Le=class{constructor(e,t,o){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(e){V(this,e)}},Ft={M:Ke,P:I,A:Ye,C:1,L:Rt,R:Ee,D:_t,V,I:te,H:J,N:Ae,U:ze,B:Te,F:Le},_r=Je.litHtmlPolyfillSupport;_r?.(ge,te),(Je.litHtmlVersions??=[]).push("3.3.1");var N=(r,e,t)=>{let o=t?.renderBefore??e,a=o._$litPart$;if(a===void 0){let i=t?.renderBefore??null;o._$litPart$=a=new te(e.insertBefore(ue(),i),i,void 0,t??{})}return a._$AI(r),a};var et=globalThis,M=class extends F{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=N(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return C}};M._$litElement$=!0,M.finalized=!0,et.litElementHydrateSupport?.({LitElement:M});var Mr=et.litElementPolyfillSupport;Mr?.({LitElement:M});(et.litElementVersions??=[]).push("4.2.1");var B={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},T=r=>(...e)=>({_$litDirective$:r,values:e}),z=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,o){this._$Ct=e,this._$AM=t,this._$Ci=o}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};var{I:Dr}=Ft,Nt=r=>r===null||typeof r!="object"&&typeof r!="function";var Bt=r=>r.strings===void 0,It=()=>document.createComment(""),re=(r,e,t)=>{let o=r._$AA.parentNode,a=e===void 0?r._$AB:e._$AA;if(t===void 0){let i=o.insertBefore(It(),a),s=o.insertBefore(It(),a);t=new Dr(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!==a||n){let c=t._$AA;for(;c!==i;){let p=c.nextSibling;o.insertBefore(c,a),c=p}}}return t},O=(r,e,t=r)=>(r._$AI(e,t),r),Pr={},Me=(r,e=Pr)=>r._$AH=e,Ot=r=>r._$AH,De=r=>{r._$AR(),r._$AA.remove()};var jt=(r,e,t)=>{let o=new Map;for(let a=e;a<=t;a++)o.set(r[a],a);return o},Io=T(class extends z{constructor(r){if(super(r),r.type!==B.CHILD)throw Error("repeat() can only be used in text expressions")}dt(r,e,t){let o;t===void 0?t=e:e!==void 0&&(o=e);let a=[],i=[],s=0;for(let n of r)a[s]=o?o(n,s):s,i[s]=t(n,s),s++;return{values:i,keys:a}}render(r,e,t){return this.dt(r,e,t).values}update(r,[e,t,o]){let a=Ot(r),{values:i,keys:s}=this.dt(e,t,o);if(!Array.isArray(a))return this.ut=s,i;let n=this.ut??=[],c=[],p,d,l=0,h=a.length-1,g=0,y=i.length-1;for(;l<=h&&g<=y;)if(a[l]===null)l++;else if(a[h]===null)h--;else if(n[l]===s[g])c[g]=O(a[l],i[g]),l++,g++;else if(n[h]===s[y])c[y]=O(a[h],i[y]),h--,y--;else if(n[l]===s[y])c[y]=O(a[l],i[y]),re(r,c[y+1],a[l]),l++,y--;else if(n[h]===s[g])c[g]=O(a[h],i[g]),re(r,a[l],a[h]),h--,g++;else if(p===void 0&&(p=jt(s,g,y),d=jt(n,l,h)),p.has(n[l]))if(p.has(n[h])){let k=d.get(s[g]),f=k!==void 0?a[k]:null;if(f===null){let $=re(r,a[l]);O($,i[g]),c[g]=$}else c[g]=O(f,i[g]),re(r,a[l],f),a[k]=null;g++}else De(a[h]),h--;else De(a[l]),l++;for(;g<=y;){let k=re(r,c[y+1]);O(k,i[g]),c[g++]=k}for(;l<=h;){let k=a[l++];k!==null&&De(k)}return this.ut=s,Me(r,c),C}});var qo=T(class extends z{constructor(){super(...arguments),this.key=x}render(r,e){return this.key=r,e}update(r,[e,t]){return e!==this.key&&(Me(r),this.key=e),t}});var Qo=T(class extends z{constructor(r){if(super(r),r.type!==B.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(o=>o!=="")));for(let o in e)e[o]&&!this.nt?.has(o)&&this.st.add(o);return this.render(e)}let t=r.element.classList;for(let o of this.st)o in e||(t.remove(o),this.st.delete(o));for(let o in e){let a=!!e[o];a===this.st.has(o)||this.nt?.has(o)||(a?(t.add(o),this.st.add(o)):(t.remove(o),this.st.delete(o)))}return C}});var me=(r,e)=>{let t=r._$AN;if(t===void 0)return!1;for(let o of t)o._$AO?.(e,!1),me(o,e);return!0},Pe=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),Ir(e)}};function Rr(r){this._$AN!==void 0?(Pe(this),this._$AM=r,Ht(this)):this._$AM=r}function Fr(r,e=!1,t=0){let o=this._$AH,a=this._$AN;if(a!==void 0&&a.size!==0)if(e)if(Array.isArray(o))for(let i=t;i<o.length;i++)me(o[i],!1),Pe(o[i]);else o!=null&&(me(o,!1),Pe(o));else me(this,r)}var Ir=r=>{r.type==B.CHILD&&(r._$AP??=Fr,r._$AQ??=Rr)},oe=class extends z{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,o){super._$AT(e,t,o),Ht(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(me(this,e),Pe(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 tt=new WeakMap,Nr=T(class extends oe{render(r){return x}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)),x}rt(r){if(this.isConnected||(r=void 0),typeof this.G=="function"){let e=this.ht??globalThis,t=tt.get(e);t===void 0&&(t=new WeakMap,tt.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"?tt.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 Re=class{constructor(e){this.G=e}disconnect(){this.G=void 0}reconnect(e){this.G=e}deref(){return this.G}},Fe=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 Wt=r=>!Nt(r)&&typeof r.then=="function",Ut=1073741823,rt=class extends oe{constructor(){super(...arguments),this._$Cwt=Ut,this._$Cbt=[],this._$CK=new Re(this),this._$CX=new Fe}render(...e){return e.find(t=>!Wt(t))??C}update(e,t){let o=this._$Cbt,a=o.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(!Wt(c))return this._$Cwt=n,c;n<a&&c===o[n]||(this._$Cwt=Ut,a=0,Promise.resolve(c).then(async p=>{for(;s.get();)await s.get();let d=i.deref();if(d!==void 0){let l=d._$Cbt.indexOf(c);l>-1&&l<d._$Cwt&&(d._$Cwt=l,d.setValue(p))}}))}return C}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}},Br=T(rt);var K=class extends z{constructor(e){if(super(e),this.it=x,e.type!==B.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===x||e==null)return this._t=void 0,this.it=e;if(e===C)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:[]}}};K.directiveName="unsafeHTML",K.resultType=1;var Ie=T(K);var fe=class extends K{};fe.directiveName="unsafeSVG",fe.resultType=2;var Or=T(fe);var Ia=["127.0.0.1","localhost"].includes(window.location.hostname);var jr=Symbol.for(""),Hr=r=>{if(r?.r===jr)return r?._$litStatic$};var qt=new Map,ot=r=>(e,...t)=>{let o=t.length,a,i,s=[],n=[],c,p=0,d=!1;for(;p<o;){for(c=e[p];p<o&&(i=t[p],(a=Hr(i))!==void 0);)c+=a+e[++p],d=!0;p!==o&&n.push(i),s.push(c),p++}if(p===o&&s.push(e[o]),d){let l=s.join("$$lit$$");(e=qt.get(l))===void 0&&(s.raw=s,qt.set(l,e=s)),t=n}return r(e,...t)},Wr=ot(_e),Oa=ot(Xe),ja=ot(Dt);var S=_e;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 j={"ocean-breeze":{id:"ocean-breeze",name:"Ocean Breeze",tags:["playful"],description:"Fresh and calming ocean-inspired palette with professional undertones",options:{liquidGlassEffects:!0,backgroundMesh:3},colors:{primary:"#0891b2",secondary:"#64748b",accent:"#06b6d4",background:"#f0f9ff",darkMode:{background:"#0c1821",secondary:"#94a3b8",primary:"#0891b2"}},typography:{baseFontSize:17,fontScale:1.5,fontFamilyHeadings:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',fontFamilyBody:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif'},spatialRhythm:{baseUnit:6,scaleRatio:1.2},shape:{radiusSize:u.RadiusSizes.xxlarge}},"midnight-steel":{id:"midnight-steel",name:"Midnight Steel",description:"Bold industrial aesthetic with sharp contrasts and urban edge",colors:{primary:"#3b82f6",secondary:"#52525b",accent:"#f59e0b",background:"#fafaf9",darkMode:{background:"#18181b",secondary:"#71717a",primary:"#3b82f6"}},typography:{baseFontSize:16,fontScale:1.333,fontFamilyHeadings:"'IBM Plex Sans', system-ui, -apple-system, sans-serif",fontFamilyBody:"'Inter', system-ui, -apple-system, sans-serif",fontWeightSemibold:600},spatialRhythm:{baseUnit:4,scaleRatio:1.25},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.thin}},"neural-glow":{id:"neural-glow",name:"Neural Glow",description:"AI-inspired with vibrant purple-blue gradients and futuristic vibes",colors:{primary:"#8b5cf6",secondary:"#6366f1",accent:"#ec4899",background:"#faf5ff",darkMode:{background:"#0f0a1a",secondary:"#818cf8",primary:"#8b5cf6"}},typography:{baseFontSize:16,fontScale:1.618,fontFamilyHeadings:"'Space Grotesk', system-ui, sans-serif",fontFamilyBody:"'Space Grotesk', system-ui, sans-serif"},spatialRhythm:{baseUnit:4,scaleRatio:1.5},shape:{radiusSize:u.RadiusSizes.xlarge,borderWidth:u.BorderWidths.medium},behavior:{transitionSpeed:u.TransitionSpeeds.fast}},"paper-and-ink":{id:"paper-and-ink",name:"Paper & Ink",tags:["app","featured"],description:"Ultra-minimal design with focus on typography and whitespace",colors:{primary:"#171717",secondary:"#737373",accent:"#525252",background:"#ffffff",darkMode:{background:"#0a0a0a",secondary:"#a3a3a3",primary:"#737373"}},typography:{baseFontSize:18,fontScale:1.333,fontFamilyHeadings:"'Helvetica Neue', 'Arial', sans-serif",fontFamilyBody:"'Georgia', 'Times New Roman', serif",fontWeightNormal:400,fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.2},shape:{radiusSize:u.RadiusSizes.none,borderWidth:u.BorderWidths.thin}},"sunset-paradise":{id:"sunset-paradise",name:"Sunset Paradise",description:"Warm tropical colors evoking golden hour by the beach",options:{liquidGlassEffects:!0,backgroundMesh:2},colors:{primary:"#ea580c",secondary:"#d4a373",accent:"#fb923c",background:"#fffbeb",darkMode:{background:"#1a0f0a",secondary:"#c9a482",primary:"#f97316"}},typography:{baseFontSize:16,fontScale:1.5,fontFamilyHeadings:"'Quicksand', 'Comfortaa', sans-serif",fontFamilyBody:"'Quicksand', 'Comfortaa', sans-serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.5},shape:{radiusSize:u.RadiusSizes.xxlarge,borderWidth:u.BorderWidths.medium}},"retro-wave":{id:"retro-wave",name:"Retro Wave",description:"Nostalgic 80s-inspired palette with neon undertones",colors:{primary:"#c026d3",secondary:"#a78bfa",accent:"#22d3ee",background:"#fef3ff",darkMode:{background:"#1a0a1f",secondary:"#c4b5fd",primary:"#d946ef"}},typography:{baseFontSize:15,fontScale:1.5,fontFamilyHeadings:"'Orbitron', 'Impact', monospace",fontFamilyBody:"'Courier New', 'Courier', monospace",fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.25},shape:{radiusSize:u.RadiusSizes.none,borderWidth:u.BorderWidths.thick},behavior:{transitionSpeed:u.TransitionSpeeds.instant}},"forest-canopy":{id:"forest-canopy",name:"Forest Canopy",description:"Natural earth tones with organic, calming green hues",colors:{primary:"#059669",secondary:"#78716c",accent:"#84cc16",background:"#f0fdf4",darkMode:{background:"#0a1410",secondary:"#a8a29e",primary:"#10b981"}},typography:{baseFontSize:16,fontScale:1.414,fontFamilyHeadings:"'Merriweather Sans', 'Arial', sans-serif",fontFamilyBody:"'Merriweather', 'Georgia', serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.3},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.thin}},"ruby-elegance":{id:"ruby-elegance",name:"Ruby Elegance",description:"Sophisticated palette with rich ruby reds and warm accents",colors:{primary:"#dc2626",secondary:"#9ca3af",accent:"#be123c",background:"#fef2f2",darkMode:{background:"#1b0808",secondary:"#d1d5db",primary:"#ef4444"}},typography:{baseFontSize:17,fontScale:1.5,fontFamilyHeadings:"'Playfair Display', 'Georgia', serif",fontFamilyBody:"'Crimson Text', 'Garamond', serif",fontWeightNormal:400,fontWeightSemibold:600},spatialRhythm:{baseUnit:4,scaleRatio:1.333},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.thin}},"desert-dawn":{id:"desert-dawn",name:"Desert Dawn",description:"Sun-baked neutrals with grounded terracotta and cool oasis accents",colors:{primary:"#b45309",secondary:"#a8a29e",accent:"#0ea5a8",background:"#fcf6ef",darkMode:{background:"#12100e",secondary:"#d1d5db",primary:"#f59e0b"}},typography:{baseFontSize:16,fontScale:1.414,fontFamilyHeadings:"'Source Sans Pro', system-ui, -apple-system, sans-serif",fontFamilyBody:"'Source Serif Pro', Georgia, serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.3},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.medium}},"contrast-pro":{id:"contrast-pro",name:"Contrast Pro",description:"Accessibility-first, high-contrast UI with assertive clarity",colors:{primary:"#1f2937",secondary:"#111827",accent:"#eab308",background:"#ffffff",darkMode:{background:"#0b0f14",secondary:"#9ca3af",primary:"#9ca3af"}},typography:{baseFontSize:17,fontScale:1.2,fontFamilyHeadings:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontFamilyBody:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontWeightBold:700},spatialRhythm:{baseUnit:3,scaleRatio:1.2},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.thick},behavior:{transitionSpeed:u.TransitionSpeeds.fast,focusRingWidth:4}},"pastel-play":{id:"pastel-play",name:"Pastel Play",description:"Playful pastels with soft surfaces and friendly rounded shapes",colors:{primary:"#db2777",secondary:"#a78bfa",accent:"#34d399",background:"#fff7fa",darkMode:{background:"#1a1016",secondary:"#c4b5fd",primary:"#ec4899"}},typography:{baseFontSize:16,fontScale:1.333,fontFamilyHeadings:"'Nunito', system-ui, -apple-system, sans-serif",fontFamilyBody:"'Nunito', system-ui, -apple-system, sans-serif",lineHeightRelaxed:u.LineHeights.relaxed},spatialRhythm:{baseUnit:6,scaleRatio:1.4},shape:{radiusSize:u.RadiusSizes.xxlarge,borderWidth:u.BorderWidths.thin},behavior:{transitionSpeed:u.TransitionSpeeds.slow,animationEasing:u.AnimationEasings["ease-out"]}},"brutalist-tech":{id:"brutalist-tech",name:"Brutalist Tech",description:"Stark grayscale with engineered accents and unapologetically bold structure",colors:{primary:"#111111",secondary:"#4b5563",accent:"#06b6d4",background:"#f8fafc",darkMode:{background:"#0b0b0b",secondary:"#9ca3af",primary:"#06b6d4"}},typography:{baseFontSize:15,fontScale:1.25,fontFamilyHeadings:"'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace",fontFamilyBody:"'Inter', system-ui, -apple-system, sans-serif",letterSpacingTight:-.02},spatialRhythm:{baseUnit:4,scaleRatio:1.25},shape:{radiusSize:u.RadiusSizes.none,borderWidth:u.BorderWidths.thick},behavior:{transitionSpeed:u.TransitionSpeeds.instant}},"zen-garden":{id:"zen-garden",name:"Zen Garden",description:"Soft botanicals with contemplative spacing and balanced motion",colors:{primary:"#3f6212",secondary:"#6b7280",accent:"#7c3aed",background:"#f7fbef",darkMode:{background:"#0d130a",secondary:"#a3a3a3",primary:"#84cc16"}},typography:{baseFontSize:17,fontScale:1.414,fontFamilyHeadings:"'Merriweather', Georgia, serif",fontFamilyBody:"'Noto Sans', system-ui, -apple-system, sans-serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.35},shape:{radiusSize:u.RadiusSizes.large,borderWidth:u.BorderWidths.medium},behavior:{transitionSpeed:u.TransitionSpeeds.normal,animationEasing:u.AnimationEasings.ease}},"fitness-pro":{id:"fitness-pro",name:"Fitness Pro",tags:["app","featured"],description:"Health and fitness tracking aesthetic with data-driven dark surfaces and vibrant accent rings",options:{liquidGlassEffects:!0,backgroundMesh:2},colors:{primary:"#e91e63",secondary:"#78909c",accent:"#ab47bc",background:"#fafafa",darkMode:{background:"#1a1d21",secondary:"#78909c",primary:"#0a4ca4"}},typography:{baseFontSize:15,fontScale:1.25,fontFamilyHeadings:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightNormal:u.LineHeights.tight},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerPadding:1.25,sectionSpacing:2.5},shape:{radiusSize:u.RadiusSizes.large,borderWidth:u.BorderWidths.thin},layers:{shadowDepth:"medium",blurMedium:12},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-out"],focusRingWidth:2}},"travel-market":{id:"travel-market",name:"Travel Market",description:"Hospitality marketplace design with clean cards, subtle shadows, and trust-building neutrals",options:{liquidGlassEffects:!0,backgroundMesh:3},colors:{primary:"#d93251",secondary:"#717171",accent:"#144990",background:"#ffffff",darkMode:{background:"#222222",secondary:"#b0b0b0",primary:"#ff5a7a"}},typography:{baseFontSize:16,fontScale:1.2,fontFamilyHeadings:"'Circular', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Circular', system-ui, -apple-system, 'Segoe UI', sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightRelaxed:u.LineHeights.relaxed},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:1440,containerPadding:1.5,sectionSpacing:3},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:8},behavior:{transitionSpeed:u.TransitionSpeeds.normal,animationEasing:u.AnimationEasings["ease-in-out"],hoverOpacity:.9}},"mobility-app":{id:"mobility-app",name:"Mobility App",tags:["app","featured"],description:"On-demand service platform with bold typography, map-ready colors, and action-driven UI",options:{liquidGlassEffects:!0,backgroundMesh:0},colors:{primary:"#000000",secondary:"#545454",accent:"#06c167",background:"#f6f6f6",darkMode:{background:"#0f0f0f",secondary:"#8a8a8a",primary:"#06c167"}},typography:{baseFontSize:16,fontScale:1.3,fontFamilyHeadings:"'UberMove', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'UberMove', system-ui, -apple-system, 'Segoe UI', sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.25,buttonPadding:1.25,inputPadding:1},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.medium},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-out"],focusRingWidth:3},a11y:{minTouchTarget:u.TouchTargetSizes.comfortable,focusStyle:u.FocusStyles.ring}},"fintech-secure":{id:"fintech-secure",name:"Fintech Secure",description:"Financial services app UI with trust-building blues, precise spacing, and security-first design",options:{liquidGlassEffects:!1,backgroundMesh:0},colors:{primary:"#0a2540",secondary:"#425466",accent:"#00d4ff",background:"#f7fafc",darkMode:{background:"#0a1929",secondary:"#8796a5",primary:"#00d4ff"}},typography:{baseFontSize:16,fontScale:1.25,fontFamilyHeadings:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyMono:"'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:1280,sectionSpacing:2.5},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:6},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-in-out"],focusRingWidth:3,focusRingOpacity:.4},a11y:{minTouchTarget:u.TouchTargetSizes.standard,focusStyle:u.FocusStyles.ring}},"social-feed":{id:"social-feed",name:"Social Feed",tags:["app","featured"],description:"Content-first social platform with minimal chrome, bold actions, and vibrant media presentation",options:{liquidGlassEffects:!0,backgroundMesh:4},colors:{primary:"#1877f2",secondary:"#65676b",accent:"#fe2c55",background:"#ffffff",darkMode:{background:"#18191a",secondary:"#b0b3b8",primary:"#2d88ff"}},typography:{baseFontSize:15,fontScale:1.2,fontFamilyHeadings:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontFamilyBody:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightNormal:u.LineHeights.relaxed},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:680,sectionSpacing:1.5},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.thin},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-out"],hoverOpacity:.85}},"enterprise-dash":{id:"enterprise-dash",tags:["app","featured"],name:"Enterprise Dashboard",description:"Data-dense business intelligence app interface with organized hierarchy and professional polish",options:{liquidGlassEffects:!1},colors:{primary:"#0066cc",secondary:"#5f6368",accent:"#1a73e8",background:"#ffffff",success:"#34a853",warning:"#fbbc04",danger:"#ea4335",darkMode:{background:"#202124",secondary:"#9aa0a6",primary:"#8ab4f8"}},typography:{baseFontSize:14,fontScale:1.2,fontFamilyHeadings:"'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyMono:"'Roboto Mono', ui-monospace, Consolas, monospace",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightNormal:u.LineHeights.tight},spatialRhythm:{baseUnit:4,scaleRatio:1.2,containerMaxWidth:1600,containerPadding:1.5,sectionSpacing:2},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:4},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-in-out"],focusRingWidth:2},layout:{densityCompact:.85,gridColumns:12}}};j.default={id:"default",name:"Default",tags:["app","featured"],description:"Fresh and modern design system with balanced aesthetics and usability",options:{liquidGlassEffects:!0,backgroundMesh:4},form:{options:{widgets:{booleans:"toggle",numbers:"input",selects:"standard"},layouts:{fieldsets:"default",arrays:"default"},enhancements:{icons:!0,datalists:!0,rangeOutput:!0},validation:{showErrors:!0,validateOnChange:!1}}},colors:{primary:"#0e7490",secondary:"#a99b95",accent:"#e54271",background:"#e7e6de",darkMode:{background:"#16171a",secondary:"#8b9199",primary:"#06b6d4"},success:null,warning:"#B38600",danger:null,info:null,gradientStops:3,elevationOpacity:.05},typography:{baseFontSize:16,fontScale:1.2,fontFamilyHeadings:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',fontFamilyBody:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',fontFamilyMono:'ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace',fontWeightLight:u.FontWeights.light,fontWeightNormal:u.FontWeights.normal,fontWeightMedium:u.FontWeights.medium,fontWeightSemibold:u.FontWeights.semibold,fontWeightBold:u.FontWeights.bold,lineHeightTight:u.LineHeights.tight,lineHeightNormal:u.LineHeights.normal,lineHeightRelaxed:u.LineHeights.relaxed,letterSpacingTight:-.025,letterSpacingNormal:0,letterSpacingWide:.025},spatialRhythm:{baseUnit:4,scaleRatio:1.25,maxSpacingSteps:32,containerMaxWidth:1200,containerPadding:1,inputPadding:.75,buttonPadding:1,sectionSpacing:2},layers:{shadowDepth:"medium",blurLight:4,blurMedium:8,blurHeavy:16,zIndexBase:0,zIndexDropdown:1e3,zIndexSticky:1020,zIndexFixed:1030,zIndexModal:1040,zIndexPopover:1050,zIndexTooltip:1060,zIndexNotification:1070},shape:{radiusSize:u.RadiusSizes.large,borderWidth:u.BorderWidths.medium,customRadius:null},behavior:{transitionSpeed:u.TransitionSpeeds.normal,animationEasing:u.AnimationEasings["ease-out"],customTransitionSpeed:null,customEasing:null,focusRingWidth:3,focusRingOpacity:.3,hoverOpacity:.8},layout:{gridColumns:12,gridGutter:1,breakpoints:{sm:640,md:768,lg:1024,xl:1280},densityCompact:.8,densityNormal:1,densityComfortable:1.2,buttonMinHeight:u.TouchTargetSizes.standard,inputMinHeight:40,utilities:{grid:!0,flex:!0,spacing:!0,container:!0},gridSystem:{columns:[1,2,3,4,6],autoFitBreakpoints:{sm:"150px",md:"250px",lg:"350px",xl:"450px"},enableGapUtilities:!0},containerMaxWidth:"1400px",containerPadding:"var(--spacing-6)"},advanced:{linkStyle:u.LinkStyles.inline,colorDerivation:"hsl"},a11y:{minTouchTarget:u.TouchTargetSizes.standard,prefersReducedMotion:!0,focusStyle:u.FocusStyles.ring},icons:{set:"phosphor",weight:"regular",defaultSize:24,externalPath:"/assets/img/icons/",sizes:{xs:16,sm:20,md:24,lg:32,xl:48,"2xl":64},include:{navigation:["arrow-left","arrow-right","arrow-up","arrow-down","arrow-counter-clockwise","caret-left","caret-right","caret-down","caret-up","x","list","list-dashes","dots-three-vertical","dots-three","house","gear","magnifying-glass","funnel","tabs","sidebar"],actions:["plus","minus","check","trash","pencil","floppy-disk","copy","download","upload","share","link","eye","eye-slash","heart","star","bookmark","note-pencil","cursor-click","clipboard","magic-wand","sparkle"],communication:["envelope","bell","bell-ringing","bell-simple","chat-circle","phone","paper-plane-tilt","user","users","user-gear","at"],content:["image","file","file-text","file-css","file-js","folder","folder-open","book-open","camera","video-camera","play","pause","microphone","brackets-curly","code","folder-simple","grid-four","briefcase","chart-line","chart-bar","database","map-pin"],status:["info","warning","check-circle","x-circle","question","shield","shield-check","shield-warning","lock","lock-open","fingerprint","circle-notch"],time:["calendar","clock","timer","hourglass"],commerce:["shopping-cart","credit-card","currency-dollar","tag","receipt","storefront"],formatting:["text-align-left","text-align-center","text-align-right","text-b","text-italic","text-underline","list-bullets","list-numbers","text-aa"],system:["cloud","cloud-arrow-up","cloud-arrow-down","desktop","device-mobile","globe","wifi-high","battery-charging","sun","moon","moon-stars","palette","rocket","feather","square","circle","squares-four","lightning","wrench"]},spritePath:"public/assets/pds/icons/pds-icons.svg"},gap:4,debug:!1};var at={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"]}};var ae=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.#L(e.shape||{}),borderWidths:this.#_(e.shape||{}),typography:this.generateTypographyTokens(e.typography||{}),shadows:this.#M(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:o="#64748b",accent:a="#ec4899",background:i="#ffffff",success:s=null,warning:n="#FFBF00",danger:c=null,info:p=null,darkMode:d={}}=e,l={primary:this.#o(t),secondary:this.#o(o),accent:this.#o(a),success:this.#o(s||this.#w(t)),warning:this.#o(n||a),danger:this.#o(c||this.#x(t)),info:this.#o(p||t),gray:this.#u(o),surface:this.#h(i)};return l.surface.fieldset=this.#k(l.surface),l.surfaceSmart=this.#y(l.surface),l.dark=this.#$(l,i,d),l.dark&&l.dark.surface&&(l.dark.surfaceSmart=this.#y(l.dark.surface)),l.interactive={light:{fill:this.#b(l.primary,4.5),text:l.primary[600]},dark:{fill:this.#b(l.dark.primary,4.5),text:this.#A(l.dark.primary,l.dark.surface.base,4.5)}},l}#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),o=t.h,a=Math.min(t.s,10);return{50:this.#t(o,a,98),100:this.#t(o,a,95),200:this.#t(o,a,88),300:this.#t(o,a,78),400:this.#t(o,a,60),500:e,600:this.#t(o,Math.min(a+5,15),45),700:this.#t(o,Math.min(a+8,18),35),800:this.#t(o,Math.min(a+10,20),20),900:this.#t(o,Math.min(a+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 o=this.#i(e),a=Math.max(o.l-o.l*t,5);return this.#t(o.h,o.s,a)}#g(e){let t=this.#i(e);if(t.l>50){let o=Math.min(t.s+5,25),a=Math.max(12-(t.l-50)*.1,8);return this.#t(t.h,o,a)}else{let o=Math.max(t.s-10,5),a=Math.min(85+(50-t.l)*.3,95);return this.#t(t.h,o,a)}}#$(e,t="#ffffff",o={}){let a=o.background?o.background:this.#g(t),i=this.#h(a),s=o.primary?this.#o(o.primary):this.#n(e.primary);return{surface:{...i,fieldset:this.#T(i)},primary:s,secondary:o.secondary?this.#o(o.secondary):this.#n(e.secondary),accent:o.accent?this.#o(o.accent):this.#n(e.accent),gray:o.secondary?this.#u(o.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("#",""),o=t.length===3?t.split("").map(i=>i+i).join(""):t,a=parseInt(o,16);return{r:a>>16&255,g:a>>8&255,b:a&255}}#p(e){let{r:t,g:o,b:a}=this.#l(e),i=[t/255,o/255,a/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 o=this.#p(e),a=this.#p(t),i=Math.max(o,a),s=Math.min(o,a);return(i+.05)/(s+.05)}#m(e,t=4.5){if(!e)return"#000000";let o="#ffffff",a="#000000",i=this.#d(e,o);if(i>=t)return o;let s=this.#d(e,a);return s>=t||s>i?a:o}#f(e,t=1){let{r:o,g:a,b:i}=this.#l(e);return`rgba(${o}, ${a}, ${i}, ${t})`}#C(e,t,o=.5){let a=this.#l(e),i=this.#l(t),s=Math.round(a.r+(i.r-a.r)*o),n=Math.round(a.g+(i.g-a.g)*o),c=Math.round(a.b+(i.b-a.b)*o);return this.#E(s,n,c)}#E(e,t,o){let a=i=>{let s=Math.max(0,Math.min(255,Math.round(i))).toString(16);return s.length===1?"0"+s:s};return`#${a(e)}${a(t)}${a(o)}`}#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",o=4.5){let a=["600","700","800","500","400","900","300","200"],i={shade:null,color:null,ratio:0};for(let s of a){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>=o)return n}return i.color||e?.["600"]||e?.["500"]}#b(e={},t=4.5){let o=["600","700","800","500","400","900"],a={shade:null,color:null,ratio:0};for(let i of o){let s=e?.[i];if(!s||typeof s!="string")continue;let n=this.#d(s,"#ffffff");if(n>a.ratio&&(a={shade:i,color:s,ratio:n}),n>=t)return s}return a.color||e?.["600"]||e?.["500"]}#y(e){let t={};return Object.entries(e).forEach(([o,a])=>{if(!a||typeof a!="string"||!a.startsWith("#"))return;let i=this.#p(a)<.5,s=this.#m(a,4.5),n=this.#m(a,3),c=this.#C(s,a,.4),p=s,d=c,l=i?"#ffffff":"#000000",h=i?.25:.1,g=this.#f(l,h),y=i?"#ffffff":"#000000",k=i?.15:.1,f=this.#f(y,k);t[o]={bg:a,text:s,textSecondary:n,textMuted:c,icon:p,iconSubtle:d,shadow:g,border:f,scheme:i?"dark":"light"}}),t}#v(e,t=.05){let o=this.#i(e),a=Math.min(o.l+(100-o.l)*t,95);return this.#t(o.h,o.s,a)}#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(([a,i])=>{let s=e[i.source];t[a]=this.#z(s,i.dimFactor)}),t}#z(e,t=.8){let o=this.#i(e),a=Math.max(o.s*t,5),i=Math.max(o.l*t,5);return this.#t(o.h,a,i)}generateSpacingTokens(e){let{baseUnit:t=4,scaleRatio:o=1.25,maxSpacingSteps:a=12}=e,i=Number.isFinite(Number(t))?Number(t):4,s=Math.min(Number.isFinite(Number(a))?Number(a):12,12),n={0:"0"};for(let c=1;c<=s;c++)n[c]=`${i*c}px`;return n}#L(e){let{radiusSize:t="medium",customRadius:o=null}=e,a;o!=null?a=o:typeof t=="number"?a=t:typeof t=="string"?a=u.RadiusSizes[t]??u.RadiusSizes.medium:a=u.RadiusSizes.medium;let i=Number.isFinite(Number(a))?Number(a):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"}}#_(e){let{borderWidth:t="medium"}=e,o;return typeof t=="number"?o=t:typeof t=="string"?o=u.BorderWidths[t]??u.BorderWidths.medium:o=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:o="system-ui, -apple-system, sans-serif",fontFamilyMono:a='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:p=u.FontWeights.medium,fontWeightSemibold:d=u.FontWeights.semibold,fontWeightBold:l=u.FontWeights.bold,lineHeightTight:h=u.LineHeights.tight,lineHeightNormal:g=u.LineHeights.normal,lineHeightRelaxed:y=u.LineHeights.relaxed}=e,k=Number.isFinite(Number(i))?Number(i):16,f=Number.isFinite(Number(s))?Number(s):1.25;return{fontFamily:{headings:t,body:o,mono:a},fontSize:{xs:`${Math.round(k/Math.pow(f,2))}px`,sm:`${Math.round(k/f)}px`,base:`${k}px`,lg:`${Math.round(k*f)}px`,xl:`${Math.round(k*Math.pow(f,2))}px`,"2xl":`${Math.round(k*Math.pow(f,3))}px`,"3xl":`${Math.round(k*Math.pow(f,4))}px`,"4xl":`${Math.round(k*Math.pow(f,5))}px`},fontWeight:{light:n?.toString()||"300",normal:c?.toString()||"400",medium:p?.toString()||"500",semibold:d?.toString()||"600",bold:l?.toString()||"700"},lineHeight:{tight:h?.toString()||"1.25",normal:g?.toString()||"1.5",relaxed:y?.toString()||"1.75"}}}#M(e){let{baseShadowOpacity:t=.1,shadowBlurMultiplier:o=1,shadowOffsetMultiplier:a=1}=e,i=`rgba(0, 0, 0, ${t})`,s=`rgba(0, 0, 0, ${t*.5})`;return{sm:`0 ${1*a}px ${2*o}px 0 ${s}`,base:`0 ${1*a}px ${3*o}px 0 ${i}, 0 ${1*a}px ${2*o}px 0 ${s}`,md:`0 ${4*a}px ${6*o}px ${-1*a}px ${i}, 0 ${2*a}px ${4*o}px ${-1*a}px ${s}`,lg:`0 ${10*a}px ${15*o}px ${-3*a}px ${i}, 0 ${4*a}px ${6*o}px ${-2*a}px ${s}`,xl:`0 ${20*a}px ${25*o}px ${-5*a}px ${i}, 0 ${10*a}px ${10*o}px ${-5*a}px ${s}`,inner:`inset 0 ${2*a}px ${4*o}px 0 ${s}`}}#D(e){let{maxWidth:t=1200,containerPadding:o=16,breakpoints:a={sm:640,md:768,lg:1024,xl:1280}}=e;return{maxWidth:`${t}px`,minHeight:"100vh",containerPadding:`${o}px`,breakpoints:{sm:`${a.sm}px`,md:`${a.md}px`,lg:`${a.lg}px`,xl:`${a.xl}px`},pageMargin:"120px",sectionGap:"160px",containerGap:"200px",heroSpacing:"240px",footerSpacing:"160px"}}#P(e){let{transitionSpeed:t=u.TransitionSpeeds.normal,animationEasing:o=u.AnimationEasings["ease-out"]}=e,a;return typeof t=="number"?a=t:typeof t=="string"&&u.TransitionSpeeds[t]?a=u.TransitionSpeeds[t]:a=u.TransitionSpeeds.normal,{fast:`${Math.round(a*.6)}ms`,normal:`${a}ms`,slow:`${Math.round(a*1.4)}ms`}}#R(e){let{baseZIndex:t=1e3,zIndexStep:o=10}=e;return{dropdown:t.toString(),sticky:(t+o*2).toString(),fixed:(t+o*3).toString(),modal:(t+o*4).toString(),drawer:(t+o*5).toString(),popover:(t+o*6).toString(),tooltip:(t+o*7).toString(),notification:(t+o*8).toString()}}#F(e){let{set:t="phosphor",weight:o="regular",defaultSize:a=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:o,defaultSize:`${a}px`,sizes:Object.fromEntries(Object.entries(i).map(([c,p])=>[c,`${p}px`])),spritePath:s,externalPath:n}}#I(e){let t=[];t.push(` /* Colors */
|
|
4
4
|
`);let o=(a,i="")=>{Object.entries(a).forEach(([s,n])=>{typeof n=="object"&&n!==null?o(n,`${i}${s}-`):typeof n=="string"&&t.push(` --color-${i}${s}: ${n};
|
|
5
5
|
`)})};return Object.entries(e).forEach(([a,i])=>{a!=="dark"&&a!=="surfaceSmart"&&a!=="interactive"&&typeof i=="object"&&i!==null&&o(i,`${a}-`)}),e.surfaceSmart&&(t.push(` /* Smart Surface Tokens (context-aware) */
|
|
6
6
|
`),Object.entries(e.surfaceSmart).forEach(([a,i])=>{t.push(` --surface-${a}-bg: ${i.bg};
|
|
@@ -2547,7 +2547,7 @@ nav[data-dropdown] {
|
|
|
2547
2547
|
|
|
2548
2548
|
`}#i(e){let t=parseInt(e.slice(1,3),16)/255,o=parseInt(e.slice(3,5),16)/255,a=parseInt(e.slice(5,7),16)/255,i=Math.max(t,o,a),s=Math.min(t,o,a),n,c,p=(i+s)/2;if(i===s)n=c=0;else{let d=i-s;switch(c=p>.5?d/(2-i-s):d/(i+s),i){case t:n=(o-a)/d+(o<a?6:0);break;case o:n=(a-t)/d+2;break;case a:n=(t-o)/d+4;break}n/=6}return{h:n*360,s:c*100,l:p*100}}#t(e,t,o){e=e/360,t=t/100,o=o/100;let a=(p,d,l)=>(l<0&&(l+=1),l>1&&(l-=1),l<1/6?p+(d-p)*6*l:l<1/2?d:l<2/3?p+(d-p)*(2/3-l)*6:p),i,s,n;if(t===0)i=s=n=o;else{let p=o<.5?o*(1+t):o+t-o*t,d=2*o-p;i=a(d,p,e+1/3),s=a(d,p,e),n=a(d,p,e-1/3)}let c=p=>{let d=Math.round(p*255).toString(16);return d.length===1?"0"+d:d};return`#${c(i)}${c(s)}${c(n)}`}getTokens(){return this.tokens}exportCSS(){return this.layeredCSS}#fe(){this.#e={tokens:this.#be(),primitives:this.#ye(),components:this.#ve(),utilities:this.#we()},this.options.debug&&this.options.log?.("debug","[Generator] Layer sizes:",{tokens:`${(this.#e.tokens.length/1024).toFixed(2)} KB`,primitives:`${(this.#e.primitives.length/1024).toFixed(2)} KB`,components:`${(this.#e.components.length/1024).toFixed(2)} KB`,utilities:`${(this.#e.utilities.length/1024).toFixed(2)} KB`})}#be(){let{colors:e,spacing:t,radius:o,borderWidths:a,typography:i,shadows:s,layout:n,transitions:c,zIndex:p,icons:d}=this.tokens,l=[`@layer tokens {
|
|
2549
2549
|
:root {
|
|
2550
|
-
${this.#
|
|
2550
|
+
${this.#I(e)}
|
|
2551
2551
|
${this.#B(t)}
|
|
2552
2552
|
${this.#O(o)}
|
|
2553
2553
|
${this.#j(a)}
|
|
@@ -3168,7 +3168,7 @@ export const ${e} = new CSSStyleSheet();
|
|
|
3168
3168
|
${e}.replaceSync(\`${o}\`);
|
|
3169
3169
|
|
|
3170
3170
|
export const ${e}CSS = \`${o}\`;
|
|
3171
|
-
`}};function
|
|
3171
|
+
`}};function Ne(r={},e={}){let t=Number(e.minContrast||4.5),o=n=>{let c=String(n||"").replace("#",""),p=c.length===3?c.split("").map(l=>l+l).join(""):c,d=parseInt(p||"0",16);return{r:d>>16&255,g:d>>8&255,b:d&255}},a=n=>{let{r:c,g:p,b:d}=o(n),l=[c/255,p/255,d/255].map(h=>h<=.03928?h/12.92:Math.pow((h+.055)/1.055,2.4));return .2126*l[0]+.7152*l[1]+.0722*l[2]},i=(n,c)=>{if(!n||!c)return 0;let p=a(n),d=a(c),l=Math.max(p,d),h=Math.min(p,d);return(l+.05)/(h+.05)},s=[];try{let c=new ae({design:structuredClone(r)}).tokens.colors,p={surfaceBg:c.surface?.base,surfaceText:c.gray?.[900]||"#000000",primaryFill:c.interactive?.light?.fill||c.primary?.[600],primaryText:c.interactive?.light?.text||c.primary?.[600]},d=i(p.primaryFill,"#ffffff");d<t&&s.push({path:"/colors/primary",message:`Primary button contrast too low in light theme (${d.toFixed(2)} < ${t}). Choose a darker primary.`,ratio:d,min:t,context:"light/btn-primary"});let l=i(p.surfaceBg,p.surfaceText);l<t&&s.push({path:"/colors/background",message:`Base text contrast on surface (light) is too low (${l.toFixed(2)} < ${t}). Adjust background or secondary (gray).`,ratio:l,min:t,context:"light/surface-text"});let h=i(p.primaryText,p.surfaceBg);h<t&&s.push({path:"/colors/primary",message:`Primary text on surface is too low for outline/link styles (light) (${h.toFixed(2)} < ${t}). Choose a darker primary or lighter surface.`,ratio:h,min:t,context:"light/outline"});let g=c.dark;if(g){let y={surfaceBg:g.surface?.base||c.surface?.inverse,primaryFill:c.interactive?.dark?.fill||g.primary?.[600],primaryText:c.interactive?.dark?.text||g.primary?.[600]},k=i(y.primaryFill,"#ffffff");k<t&&s.push({path:"/colors/darkMode/primary",message:`Primary button contrast too low in dark theme (${k.toFixed(2)} < ${t}). Override darkMode.primary or pick a brighter hue.`,ratio:k,min:t,context:"dark/btn-primary"});let f=i(y.primaryText,y.surfaceBg);f<t&&s.push({path:"/colors/darkMode/primary",message:`Primary text on surface is too low for outline/link styles (dark) (${f.toFixed(2)} < ${t}). Override darkMode.primary/background.`,ratio:f,min:t,context:"dark/outline"})}}catch(n){s.push({path:"/",message:`Validation failed: ${String(n?.message||n)}`,ratio:0,min:0})}return{ok:s.length===0,issues:s}}var it=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:build' and configured PDS.start() with the correct static.root path");let o=new CSSStyleSheet;return o.replaceSync("/* Failed to load "+e+" */"),o}}get mode(){return this._mode}get isLive(){return this._mode==="live"}},ie=new it;function Ur(r){try{if(typeof document>"u")return;if(typeof CSSStyleSheet<"u"&&"adoptedStyleSheets"in Document.prototype){let o=new CSSStyleSheet;o.replaceSync(r),o._pds=!0;let a=(document.adoptedStyleSheets||[]).filter(i=>i._pds!==!0);document.adoptedStyleSheets=[...a,o];return}let e="pds-runtime-stylesheet",t=document.getElementById(e);if(!t){t=document.createElement("style"),t.id=e,t.type="text/css";let o=document.head||document.getElementsByTagName("head")[0];o?o.appendChild(t):document.documentElement.appendChild(t)}t.textContent=r}catch(e){console.warn("installRuntimeStyles failed:",e)}}function Gt(r){let e=r;if(!e||typeof e!="object"){console.error("[Runtime] applyStyles requires an explicit generator instance in live mode");return}let t=e.layeredCSS||e.css||"";if(!t){e.options?.log?.("warn","[Runtime] No CSS available on generator to apply");return}Ur(t)}async function Vt(r,e=[],t=null){try{let o=t?.primitivesStylesheet?t.primitivesStylesheet:await ie.getStylesheet("primitives");r.adoptedStyleSheets=[o,...e]}catch(o){let a=r.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${a}> failed to adopt primitives:`,o),r.adoptedStyleSheets=e}}async function Jt(r,e=["primitives"],t=[],o=null){try{let i=(await Promise.all(e.map(async s=>{if(o)switch(s){case"tokens":return o.tokensStylesheet;case"primitives":return o.primitivesStylesheet;case"components":return o.componentsStylesheet;case"utilities":return o.utilitiesStylesheet;default:break}return ie.getStylesheet(s)}))).filter(s=>s!==null);r.adoptedStyleSheets=[...i,...t]}catch(a){let i=r.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${i}> failed to adopt layers:`,a),r.adoptedStyleSheets=t}}function Kt(r){let e=new CSSStyleSheet;return e.replaceSync(r),e}var Be={mode:"live",preset:"default",autoDefine:{predefine:["pds-icon","pds-drawer","pds-toaster"]},log(r,e,...t){console[r](e,...t)}};async function Yt(r,e={}){return e={...{title:"Confirm",type:"confirm",buttons:{ok:{name:"OK",primary:!0},cancel:{name:"Cancel",cancel:!0}}},...e},new Promise(o=>{let a=document.createElement("dialog");Be.options?.liquidGlassEffects&&a.classList.add("liquid-glass"),e.size&&a.classList.add(`dialog-${e.size}`),e.type&&a.classList.add(`dialog-${e.type}`),e.class&&(Array.isArray(e.class)?a.classList.add(...e.class):a.classList.add(e.class)),e.maxHeight&&a.style.setProperty("--dialog-max-height",e.maxHeight);let i=Object.entries(e.buttons).map(([n,c])=>{let p=c.primary?"btn-primary btn-sm":"btn-outline btn-sm";return`<button type="${c.cancel?"button":"submit"}" class="${p}" value="${n}">${c.name}</button>`});if(e.useForm){let n=document.createElement("div");typeof r=="object"&&r._$litType$?N(r,n):typeof r=="string"?n.textContent=r:N(r,n);let c=n.querySelector("form");if(c){a.innerHTML=`
|
|
3172
3172
|
<header>
|
|
3173
3173
|
<h2>${e.title}</h2>
|
|
3174
3174
|
</header>
|
|
@@ -3192,22 +3192,22 @@ export const ${e}CSS = \`${o}\`;
|
|
|
3192
3192
|
${i.join("")}
|
|
3193
3193
|
</footer>
|
|
3194
3194
|
</form>
|
|
3195
|
-
`;let n=a.querySelector("#msg-container");typeof r=="object"&&r._$litType$?N(r,n):typeof r=="string"?n.textContent=r:N(r,n)}a.addEventListener("click",n=>{n.target.closest('button[value="cancel"]')&&(a.close(),o(!1))});let s=()=>{let n=a.querySelector("form");n?n.addEventListener("submit",c=>{c.preventDefault();let p;e.useForm&&c.submitter.value==="ok"?(console.log("Found form:",n),console.log("Form elements:",n?Array.from(n.elements):"no form"),p=new FormData(n),console.log("FormData entries:",Array.from(p.entries()))):p=c.submitter.value==="ok",a.close(),o(p)}):requestAnimationFrame(s)};s(),a.addEventListener("close",()=>{setTimeout(()=>a.remove(),200)}),document.body.appendChild(a),typeof e.rendered=="function"&&e.rendered(a),a.showModal()})}async function Wr(){let r=document.querySelector("pds-toaster");return r||(r=document.createElement("pds-toaster"),document.body.appendChild(r),await customElements.whenDefined("pds-toaster")),r}async function P(r,e={}){return(await Wr()).toast(r,e)}P.success=async function(r,e={}){return P(r,{...e,type:"success"})};P.error=async function(r,e={}){return P(r,{...e,type:"error"})};P.warning=async function(r,e={}){return P(r,{...e,type:"warning"})};P.info=async function(r,e={}){return P(r,{...e,type:"information"})};var Ur=[{selector:".accordion"},{selector:"nav[data-dropdown]"},{selector:"label[data-toggle]"},{selector:'input[type="range"]'},{selector:"form[data-required]"},{selector:"fieldset[role=group][data-open]"},{selector:"button, a[class*='btn-']"}];function qr(r){r.dataset.enhancedAccordion||(r.dataset.enhancedAccordion="true",r.addEventListener("toggle",e=>{e.target.open&&e.target.parentElement===r&&r.querySelectorAll(":scope > details[open]").forEach(t=>{t!==e.target&&(t.open=!1)})},!0))}function Gr(r){if(r.dataset.enhancedDropdown)return;r.dataset.enhancedDropdown="true";let e=r.querySelector("menu");if(!e)return;let t=r.querySelector("[data-dropdown-toggle]")||r.querySelector("button");t&&!t.hasAttribute("type")&&t.setAttribute("type","button"),e.id||(e.id=`dropdown-${Math.random().toString(36).slice(2,9)}`),e.setAttribute("role",e.getAttribute("role")||"menu"),e.hasAttribute("aria-hidden")||e.setAttribute("aria-hidden","true"),t&&(t.setAttribute("aria-haspopup","true"),t.setAttribute("aria-controls",e.id),t.setAttribute("aria-expanded","false"));let o=()=>{let n=(r.getAttribute("data-mode")||"auto").toLowerCase();if(n==="up"||n==="down")return n;let c=r.getBoundingClientRect(),p=Math.max(0,window.innerHeight-c.bottom);return Math.max(0,c.top)>p?"up":"down"},a=()=>{r.dataset.dropdownDirection=o(),e.setAttribute("aria-hidden","false"),t?.setAttribute("aria-expanded","true")},i=()=>{e.setAttribute("aria-hidden","true"),t?.setAttribute("aria-expanded","false")},s=()=>{e.getAttribute("aria-hidden")==="false"?i():a()};t?.addEventListener("click",n=>{n.preventDefault(),n.stopPropagation(),s()}),document.addEventListener("click",n=>{r.contains(n.target)||i()}),r.addEventListener("keydown",n=>{n.key==="Escape"&&(i(),t?.focus())}),r.addEventListener("focusout",n=>{(!n.relatedTarget||!r.contains(n.relatedTarget))&&i()})}function Vr(r){if(r.dataset.enhancedToggle)return;r.dataset.enhancedToggle="true";let e=r.querySelector('input[type="checkbox"]');if(!e)return;r.hasAttribute("tabindex")||r.setAttribute("tabindex","0"),r.setAttribute("role","switch"),r.setAttribute("aria-checked",e.checked?"true":"false");let t=document.createElement("span");t.className="toggle-switch",t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true");let o=document.createElement("span");o.className="toggle-knob",t.appendChild(o),r.insertBefore(t,e.nextSibling);let a=()=>{r.setAttribute("aria-checked",e.checked?"true":"false")},i=()=>{e.disabled||(e.checked=!e.checked,a(),e.dispatchEvent(new Event("change",{bubbles:!0})))};r.addEventListener("click",s=>{s.preventDefault(),i()}),r.addEventListener("keydown",s=>{(s.key===" "||s.key==="Enter")&&(s.preventDefault(),i())}),e.addEventListener("change",a)}function Jr(r){if(r.dataset.enhancedRange)return;let e=r.closest("label"),t=e?.classList.contains("range-output"),o=r.id||`range-${Math.random().toString(36).substring(2,11)}`,a=`${o}-output`;if(r.id=o,t){let i=e.querySelector("span");if(i&&!i.classList.contains("range-output-wrapper")){let s=document.createElement("span");s.className="range-output-wrapper",s.style.display="flex",s.style.justifyContent="space-between",s.style.alignItems="center";let n=document.createElement("span");n.textContent=i.textContent,s.appendChild(n);let c=document.createElement("output");c.id=a,c.setAttribute("for",o),c.style.color="var(--surface-text-secondary, var(--color-text-secondary))",c.style.fontSize="0.875rem",c.textContent=r.value,s.appendChild(c),i.textContent="",i.appendChild(s);let p=()=>{c.textContent=r.value};r.addEventListener("input",p)}}else{let i=r.closest(".range-container");i||(i=document.createElement("div"),i.className="range-container",r.parentNode?.insertBefore(i,r),i.appendChild(r)),i.style.position="relative";let s=document.createElement("output");s.id=a,s.setAttribute("for",o),s.className="range-bubble",s.setAttribute("aria-live","polite"),i.appendChild(s);let n=()=>{let d=parseFloat(r.min)||0,l=parseFloat(r.max)||100,h=parseFloat(r.value),g=(h-d)/(l-d);s.style.left=`calc(${g*100}% )`,s.textContent=String(h)},c=()=>s.classList.add("visible"),p=()=>s.classList.remove("visible");r.addEventListener("input",n),r.addEventListener("pointerdown",c),r.addEventListener("pointerup",p),r.addEventListener("pointerleave",p),r.addEventListener("focus",c),r.addEventListener("blur",p),n()}r.dataset.enhancedRange="1"}function Kr(r){if(r.dataset.enhancedRequired)return;r.dataset.enhancedRequired="true";let e=t=>{let o=t.closest("label");if(!o||o.querySelector(".required-asterisk"))return;let a=document.createElement("span");a.classList.add("required-asterisk"),a.textContent="*",a.style.marginLeft="4px",o.querySelector("span").appendChild(a);let i=t.closest("form");if(i&&!i.querySelector(".required-legend")){let s=document.createElement("small");s.classList.add("required-legend"),s.textContent="* Required fields",i.insertBefore(s,i.querySelector(".form-actions")||i.lastElementChild)}};r.querySelectorAll("[required]").forEach(t=>{e(t)})}function Yr(r){if(r.dataset.enhancedOpenGroup)return;r.dataset.enhancedOpenGroup="true",r.classList.add("flex","flex-wrap","buttons");let e=document.createElement("input");e.type="text",e.placeholder="Add item...",e.classList.add("input-text","input-sm"),e.style.width="auto";let t=r.querySelector('input[type="radio"], input[type="checkbox"]');r.appendChild(e),e.addEventListener("keydown",o=>{if(o.key==="Enter"||o.key==="Tab"){let a=e.value.trim();if(a){o.preventDefault();let i=t.type==="radio"?"radio":"checkbox",s=`open-group-${Math.random().toString(36).substring(2,11)}`,n=document.createElement("label"),c=document.createElement("span");c.setAttribute("data-label",""),c.textContent=a;let p=document.createElement("input");p.type=i,p.name=t.name||r.getAttribute("data-name")||"open-group",p.value=a,p.id=s,n.appendChild(c),n.appendChild(p),r.insertBefore(n,e),e.value=""}}else if(o.key==="Backspace"&&e.value===""){o.preventDefault();let a=r.querySelectorAll("label");a.length>0&&a[a.length-1].remove()}})}function Zr(r){if(r.dataset.enhancedBtnWorking)return;r.dataset.enhancedBtnWorking="true";let e=null,t=!1;new MutationObserver(a=>{a.forEach(i=>{if(i.attributeName==="class"){let s=r.classList.contains("btn-working"),n=r.querySelector("pds-icon");if(s)if(n)e||(e=n.getAttribute("icon")),n.setAttribute("icon","circle-notch");else{let c=document.createElement("pds-icon");c.setAttribute("icon","circle-notch"),c.setAttribute("size","sm"),r.insertBefore(c,r.firstChild),t=!0}else i.oldValue?.includes("btn-working")&&n&&(t?(n.remove(),t=!1):e&&(n.setAttribute("icon",e),e=null))}})}).observe(r,{attributes:!0,attributeFilter:["class"],attributeOldValue:!0})}var Qr=new Map([[".accordion",qr],["nav[data-dropdown]",Gr],["label[data-toggle]",Vr],['input[type="range"]',Jr],["form[data-required]",Kr],["fieldset[role=group][data-open]",Yr],["button, a[class*='btn-']",Zr]]),st=Ur.map(r=>({...r,run:Qr.get(r.selector)||(()=>{})}));var Kt="pds",Xr=/^([a-z][a-z0-9+\-.]*:)?\/\//i,Jt=/^[a-z]:/i;function be(r=""){return r.endsWith("/")?r:`${r}/`}function eo(r="",e=Kt){let t=r.replace(/\/+$/,"");return new RegExp(`(?:^|/)${e}$`,"i").test(t)?t:`${t}/${e}`}function to(r){return r.replace(/^\.\/+/,"")}function ro(r){return Jt.test(r)?r.replace(Jt,"").replace(/^\/+/,""):r}function oo(r){return r.startsWith("public/")?r.substring(7):r}function nt(r,e={}){let t=e.segment||Kt,o=e.defaultRoot||`/assets/${t}/`,a=r?.public&&r.public?.root||r?.static&&r.static?.root||null;if(!a||typeof a!="string")return be(o);let i=a.trim();return i?(i=i.replace(/\\/g,"/"),i=eo(i,t),i=be(i),Xr.test(i)?i:(i=to(i),i=ro(i),i.startsWith("/")||(i=oo(i),i.startsWith("/")||(i=`/${i}`),i=i.replace(/\/+/g,(s,n)=>n===0?s:"/")),be(i))):be(o)}var io=/^[a-z][a-z0-9+\-.]*:\/\//i,ye=(()=>{try{return import.meta.url}catch{return}})(),je=r=>typeof r=="string"&&r.length&&!r.endsWith("/")?`${r}/`:r;function He(r,e={}){if(!r||io.test(r))return r;let{preferModule:t=!0}=e,o=()=>{if(!ye)return null;try{return new URL(r,ye).href}catch{return null}},a=()=>{if(typeof window>"u"||!window.location?.origin)return null;try{return new URL(r,window.location.origin).href}catch{return null}};return(t?o()||a():a()||o())||r}var Qt=(()=>{if(ye)try{let r=new URL(ye);if(/\/public\/assets\/js\//.test(r.pathname))return new URL("../pds/",ye).href}catch{return}})(),Xt=!1;function er(r){Xt||typeof document>"u"||(Xt=!0,r.addEventListener("pds:ready",e=>{let t=e.detail?.mode;t&&document.documentElement.classList.add(`pds-${t}`,"pds-ready")}))}function tr(r={},e={}){if(!e||typeof e!="object")return r;let t=Array.isArray(r)?[...r]:{...r};for(let[o,a]of Object.entries(e))a&&typeof a=="object"&&!Array.isArray(a)?t[o]=tr(t[o]&&typeof t[o]=="object"?t[o]:{},a):t[o]=a;return t}function lt(r=""){return String(r).toLowerCase().replace(/&/g," and ").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function se(r){if(r==null)return r;if(typeof r=="function")return;if(typeof r!="object")return r;if(Array.isArray(r))return r.map(t=>se(t)).filter(t=>t!==void 0);let e={};for(let t in r)if(r.hasOwnProperty(t)){let o=r[t];if(typeof o!="function"){let a=se(o);a!==void 0&&(e[t]=a)}}return e}function rr(r={},e={},{presets:t,defaultLog:o}){let a=typeof r=="object"&&("colors"in r||"typography"in r||"spatialRhythm"in r||"shape"in r||"behavior"in r||"layout"in r||"advanced"in r||"a11y"in r||"components"in r||"icons"in r),i=r&&r.enhancers;i&&!Array.isArray(i)&&(i=Object.values(i));let s=i??e.enhancers??[],n=r&&r.preset,c=r&&r.design,p="preset"in(r||{})||"design"in(r||{})||"enhancers"in(r||{}),d,l=null;if(p){let h=String(n||"default").toLowerCase(),g=t?.[h]||Object.values(t||{}).find(R=>lt(R.name)===h||String(R.name||"").toLowerCase()===h);if(!g)throw new Error(`PDS preset not found: "${n||"default"}"`);l={id:g.id||lt(g.name),name:g.name||g.id||String(h)};let y=structuredClone(g);if(c&&typeof c=="object"){let R=se(c);y=tr(y,structuredClone(R))}let{mode:k,autoDefine:f,applyGlobalStyles:$,manageTheme:Z,themeStorageKey:A,preloadStyles:H,criticalLayers:D,managerURL:le,manager:Q,preset:xe,design:_,enhancers:W,log:X,...E}=r;d={...E,design:y,preset:l.name,log:X||o}}else if(a){let{log:h,...g}=r;d={design:structuredClone(g),log:h||o}}else{let h=t?.default||Object.values(t||{}).find(g=>lt(g.name)==="default");if(!h)throw new Error("PDS default preset not available");l={id:h.id||"default",name:h.name||"Default"},d={design:structuredClone(h),preset:l.name,log:o}}return{generatorConfig:d,enhancers:s,presetInfo:l}}function or({manageTheme:r,themeStorageKey:e,applyResolvedTheme:t,setupSystemListenerIfNeeded:o}){let a="light",i=null;if(r&&typeof window<"u"){try{i=localStorage.getItem(e)||null}catch{i=null}try{t?.(i),o?.(i)}catch{}i?i==="system"?a=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a=i:a=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}return{resolvedTheme:a,storedTheme:i}}function ar({PDS:r,defaultStorageKey:e="pure-ds-theme",setupSystemListenerIfNeeded:t,onApply:o}={}){return async function(i,s={}){let{storageKey:n=e,persist:c=!0}=s;if(!["light","dark","system"].includes(i))throw new Error(`Invalid theme "${i}". Must be "light", "dark", or "system".`);if(typeof window>"u")return i==="system"?"light":i;let p=i;if(i==="system"&&(p=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),document.documentElement.setAttribute("data-theme",p),c)try{localStorage.setItem(n,i)}catch{}try{t?.(i)}catch{}typeof o=="function"&&await o({theme:i,resolvedTheme:p});try{r?.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:p,requested:i,source:"programmatic"}}))}catch{}return p}}function dt(r,{resolvePublicAssetURL:e}){let t=!!(r?.public?.root||r?.static?.root),o=e(r);return!t&&Qt&&(o=Qt),je(He(o))}async function ir(r,{baseEnhancers:e=[]}={}){let{autoDefineBaseURL:t="/auto-define/",autoDefinePreload:o=[],autoDefineMapper:a=null,enhancers:i=[],autoDefineOverrides:s=null,autoDefinePreferModule:n=!0}=r,c=(()=>{let d=new Map;return(e||[]).forEach(l=>d.set(l.selector,l)),(i||[]).forEach(l=>d.set(l.selector,l)),Array.from(d.values())})(),p=null;if(typeof window<"u"&&typeof document<"u"){let d=null;try{let f=await Promise.resolve().then(()=>(Zt(),Yt));d=f?.AutoDefiner||f?.default?.AutoDefiner||f?.default||null}catch(f){console.warn("AutoDefiner not available:",f?.message||f)}let l=f=>{switch(f){case"pds-tabpanel":return"pds-tabstrip.js";default:return`${f}.js`}},{mapper:h,...g}=s&&typeof s=="object"?s:{},k={baseURL:t&&je(He(t,{preferModule:n})),predefine:o,scanExisting:!0,observeShadows:!0,patchAttachShadow:!0,debounceMs:16,enhancers:c,onError:(f,$)=>{if(typeof f=="string"&&f.startsWith("pds-")){let A=["pds-form","pds-drawer"].includes(f),H=$?.message?.includes("#pds/lit")||$?.message?.includes("Failed to resolve module specifier");A&&H?console.error(`\u274C PDS component <${f}> requires Lit but #pds/lit is not in import map.
|
|
3195
|
+
`;let n=a.querySelector("#msg-container");typeof r=="object"&&r._$litType$?N(r,n):typeof r=="string"?n.textContent=r:N(r,n)}a.addEventListener("click",n=>{n.target.closest('button[value="cancel"]')&&(a.close(),o(!1))});let s=()=>{let n=a.querySelector("form");n?n.addEventListener("submit",c=>{c.preventDefault();let p;e.useForm&&c.submitter.value==="ok"?(console.log("Found form:",n),console.log("Form elements:",n?Array.from(n.elements):"no form"),p=new FormData(n),console.log("FormData entries:",Array.from(p.entries()))):p=c.submitter.value==="ok",a.close(),o(p)}):requestAnimationFrame(s)};s(),a.addEventListener("close",()=>{setTimeout(()=>a.remove(),200)}),document.body.appendChild(a),typeof e.rendered=="function"&&e.rendered(a),a.showModal()})}async function qr(){let r=document.querySelector("pds-toaster");return r||(r=document.createElement("pds-toaster"),document.body.appendChild(r),await customElements.whenDefined("pds-toaster")),r}async function P(r,e={}){return(await qr()).toast(r,e)}P.success=async function(r,e={}){return P(r,{...e,type:"success"})};P.error=async function(r,e={}){return P(r,{...e,type:"error"})};P.warning=async function(r,e={}){return P(r,{...e,type:"warning"})};P.info=async function(r,e={}){return P(r,{...e,type:"information"})};var Gr=[{selector:".accordion"},{selector:"nav[data-dropdown]"},{selector:"label[data-toggle]"},{selector:'input[type="range"]'},{selector:"form[data-required]"},{selector:"fieldset[role=group][data-open]"},{selector:"button, a[class*='btn-']"}];function Vr(r){r.dataset.enhancedAccordion||(r.dataset.enhancedAccordion="true",r.addEventListener("toggle",e=>{e.target.open&&e.target.parentElement===r&&r.querySelectorAll(":scope > details[open]").forEach(t=>{t!==e.target&&(t.open=!1)})},!0))}function Jr(r){if(r.dataset.enhancedDropdown)return;r.dataset.enhancedDropdown="true";let e=r.querySelector("menu");if(!e)return;let t=r.querySelector("[data-dropdown-toggle]")||r.querySelector("button");t&&!t.hasAttribute("type")&&t.setAttribute("type","button"),e.id||(e.id=`dropdown-${Math.random().toString(36).slice(2,9)}`),e.setAttribute("role",e.getAttribute("role")||"menu"),e.hasAttribute("aria-hidden")||e.setAttribute("aria-hidden","true"),t&&(t.setAttribute("aria-haspopup","true"),t.setAttribute("aria-controls",e.id),t.setAttribute("aria-expanded","false"));let o=()=>{let n=(r.getAttribute("data-mode")||"auto").toLowerCase();if(n==="up"||n==="down")return n;let c=r.getBoundingClientRect(),p=Math.max(0,window.innerHeight-c.bottom);return Math.max(0,c.top)>p?"up":"down"},a=()=>{r.dataset.dropdownDirection=o(),e.setAttribute("aria-hidden","false"),t?.setAttribute("aria-expanded","true")},i=()=>{e.setAttribute("aria-hidden","true"),t?.setAttribute("aria-expanded","false")},s=()=>{e.getAttribute("aria-hidden")==="false"?i():a()};t?.addEventListener("click",n=>{n.preventDefault(),n.stopPropagation(),s()}),document.addEventListener("click",n=>{r.contains(n.target)||i()}),r.addEventListener("keydown",n=>{n.key==="Escape"&&(i(),t?.focus())}),r.addEventListener("focusout",n=>{(!n.relatedTarget||!r.contains(n.relatedTarget))&&i()})}function Kr(r){if(r.dataset.enhancedToggle)return;r.dataset.enhancedToggle="true";let e=r.querySelector('input[type="checkbox"]');if(!e)return;r.hasAttribute("tabindex")||r.setAttribute("tabindex","0"),r.setAttribute("role","switch"),r.setAttribute("aria-checked",e.checked?"true":"false");let t=document.createElement("span");t.className="toggle-switch",t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true");let o=document.createElement("span");o.className="toggle-knob",t.appendChild(o),r.insertBefore(t,e.nextSibling);let a=()=>{r.setAttribute("aria-checked",e.checked?"true":"false")},i=()=>{e.disabled||(e.checked=!e.checked,a(),e.dispatchEvent(new Event("change",{bubbles:!0})))};r.addEventListener("click",s=>{s.preventDefault(),i()}),r.addEventListener("keydown",s=>{(s.key===" "||s.key==="Enter")&&(s.preventDefault(),i())}),e.addEventListener("change",a)}function Yr(r){if(r.dataset.enhancedRange)return;let e=r.closest("label"),t=e?.classList.contains("range-output"),o=r.id||`range-${Math.random().toString(36).substring(2,11)}`,a=`${o}-output`;if(r.id=o,t){let i=e.querySelector("span");if(i&&!i.classList.contains("range-output-wrapper")){let s=document.createElement("span");s.className="range-output-wrapper",s.style.display="flex",s.style.justifyContent="space-between",s.style.alignItems="center";let n=document.createElement("span");n.textContent=i.textContent,s.appendChild(n);let c=document.createElement("output");c.id=a,c.setAttribute("for",o),c.style.color="var(--surface-text-secondary, var(--color-text-secondary))",c.style.fontSize="0.875rem",c.textContent=r.value,s.appendChild(c),i.textContent="",i.appendChild(s);let p=()=>{c.textContent=r.value};r.addEventListener("input",p)}}else{let i=r.closest(".range-container");i||(i=document.createElement("div"),i.className="range-container",r.parentNode?.insertBefore(i,r),i.appendChild(r)),i.style.position="relative";let s=document.createElement("output");s.id=a,s.setAttribute("for",o),s.className="range-bubble",s.setAttribute("aria-live","polite"),i.appendChild(s);let n=()=>{let d=parseFloat(r.min)||0,l=parseFloat(r.max)||100,h=parseFloat(r.value),g=(h-d)/(l-d);s.style.left=`calc(${g*100}% )`,s.textContent=String(h)},c=()=>s.classList.add("visible"),p=()=>s.classList.remove("visible");r.addEventListener("input",n),r.addEventListener("pointerdown",c),r.addEventListener("pointerup",p),r.addEventListener("pointerleave",p),r.addEventListener("focus",c),r.addEventListener("blur",p),n()}r.dataset.enhancedRange="1"}function Zr(r){if(r.dataset.enhancedRequired)return;r.dataset.enhancedRequired="true";let e=t=>{let o=t.closest("label");if(!o||o.querySelector(".required-asterisk"))return;let a=document.createElement("span");a.classList.add("required-asterisk"),a.textContent="*",a.style.marginLeft="4px",o.querySelector("span").appendChild(a);let i=t.closest("form");if(i&&!i.querySelector(".required-legend")){let s=document.createElement("small");s.classList.add("required-legend"),s.textContent="* Required fields",i.insertBefore(s,i.querySelector(".form-actions")||i.lastElementChild)}};r.querySelectorAll("[required]").forEach(t=>{e(t)})}function Qr(r){if(r.dataset.enhancedOpenGroup)return;r.dataset.enhancedOpenGroup="true",r.classList.add("flex","flex-wrap","buttons");let e=document.createElement("input");e.type="text",e.placeholder="Add item...",e.classList.add("input-text","input-sm"),e.style.width="auto";let t=r.querySelector('input[type="radio"], input[type="checkbox"]');r.appendChild(e),e.addEventListener("keydown",o=>{if(o.key==="Enter"||o.key==="Tab"){let a=e.value.trim();if(a){o.preventDefault();let i=t.type==="radio"?"radio":"checkbox",s=`open-group-${Math.random().toString(36).substring(2,11)}`,n=document.createElement("label"),c=document.createElement("span");c.setAttribute("data-label",""),c.textContent=a;let p=document.createElement("input");p.type=i,p.name=t.name||r.getAttribute("data-name")||"open-group",p.value=a,p.id=s,n.appendChild(c),n.appendChild(p),r.insertBefore(n,e),e.value=""}}else if(o.key==="Backspace"&&e.value===""){o.preventDefault();let a=r.querySelectorAll("label");a.length>0&&a[a.length-1].remove()}})}function Xr(r){if(r.dataset.enhancedBtnWorking)return;r.dataset.enhancedBtnWorking="true";let e=null,t=!1;new MutationObserver(a=>{a.forEach(i=>{if(i.attributeName==="class"){let s=r.classList.contains("btn-working"),n=r.querySelector("pds-icon");if(s)if(n)e||(e=n.getAttribute("icon")),n.setAttribute("icon","circle-notch");else{let c=document.createElement("pds-icon");c.setAttribute("icon","circle-notch"),c.setAttribute("size","sm"),r.insertBefore(c,r.firstChild),t=!0}else i.oldValue?.includes("btn-working")&&n&&(t?(n.remove(),t=!1):e&&(n.setAttribute("icon",e),e=null))}})}).observe(r,{attributes:!0,attributeFilter:["class"],attributeOldValue:!0})}var eo=new Map([[".accordion",Vr],["nav[data-dropdown]",Jr],["label[data-toggle]",Kr],['input[type="range"]',Yr],["form[data-required]",Zr],["fieldset[role=group][data-open]",Qr],["button, a[class*='btn-']",Xr]]),st=Gr.map(r=>({...r,run:eo.get(r.selector)||(()=>{})}));var Qt="pds",to=/^([a-z][a-z0-9+\-.]*:)?\/\//i,Zt=/^[a-z]:/i;function be(r=""){return r.endsWith("/")?r:`${r}/`}function ro(r="",e=Qt){let t=r.replace(/\/+$/,"");return new RegExp(`(?:^|/)${e}$`,"i").test(t)?t:`${t}/${e}`}function oo(r){return r.replace(/^\.\/+/,"")}function ao(r){return Zt.test(r)?r.replace(Zt,"").replace(/^\/+/,""):r}function io(r){return r.startsWith("public/")?r.substring(7):r}function nt(r,e={}){let t=e.segment||Qt,o=e.defaultRoot||`/assets/${t}/`,a=r?.public&&r.public?.root||r?.static&&r.static?.root||null;if(!a||typeof a!="string")return be(o);let i=a.trim();return i?(i=i.replace(/\\/g,"/"),i=ro(i,t),i=be(i),to.test(i)?i:(i=oo(i),i=ao(i),i.startsWith("/")||(i=io(i),i.startsWith("/")||(i=`/${i}`),i=i.replace(/\/+/g,(s,n)=>n===0?s:"/")),be(i))):be(o)}var no=/^[a-z][a-z0-9+\-.]*:\/\//i,ye=(()=>{try{return import.meta.url}catch{return}})(),Oe=r=>typeof r=="string"&&r.length&&!r.endsWith("/")?`${r}/`:r;function je(r,e={}){if(!r||no.test(r))return r;let{preferModule:t=!0}=e,o=()=>{if(!ye)return null;try{return new URL(r,ye).href}catch{return null}},a=()=>{if(typeof window>"u"||!window.location?.origin)return null;try{return new URL(r,window.location.origin).href}catch{return null}};return(t?o()||a():a()||o())||r}var tr=(()=>{if(ye)try{let r=new URL(ye);if(/\/public\/assets\/js\//.test(r.pathname))return new URL("../pds/",ye).href}catch{return}})(),rr=!1;function or(r){rr||typeof document>"u"||(rr=!0,r.addEventListener("pds:ready",e=>{let t=e.detail?.mode;t&&document.documentElement.classList.add(`pds-${t}`,"pds-ready")}))}function ar(r={},e={}){if(!e||typeof e!="object")return r;let t=Array.isArray(r)?[...r]:{...r};for(let[o,a]of Object.entries(e))a&&typeof a=="object"&&!Array.isArray(a)?t[o]=ar(t[o]&&typeof t[o]=="object"?t[o]:{},a):t[o]=a;return t}function lt(r=""){return String(r).toLowerCase().replace(/&/g," and ").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function se(r){if(r==null)return r;if(typeof r=="function")return;if(typeof r!="object")return r;if(Array.isArray(r))return r.map(t=>se(t)).filter(t=>t!==void 0);let e={};for(let t in r)if(r.hasOwnProperty(t)){let o=r[t];if(typeof o!="function"){let a=se(o);a!==void 0&&(e[t]=a)}}return e}function ir(r={},e={},{presets:t,defaultLog:o}){let a=typeof r=="object"&&("colors"in r||"typography"in r||"spatialRhythm"in r||"shape"in r||"behavior"in r||"layout"in r||"advanced"in r||"a11y"in r||"components"in r||"icons"in r),i=r&&r.enhancers;i&&!Array.isArray(i)&&(i=Object.values(i));let s=i??e.enhancers??[],n=r&&r.preset,c=r&&r.design,p="preset"in(r||{})||"design"in(r||{})||"enhancers"in(r||{}),d,l=null;if(p){let h=String(n||"default").toLowerCase(),g=t?.[h]||Object.values(t||{}).find(R=>lt(R.name)===h||String(R.name||"").toLowerCase()===h);if(!g)throw new Error(`PDS preset not found: "${n||"default"}"`);l={id:g.id||lt(g.name),name:g.name||g.id||String(h)};let y=structuredClone(g);if(c&&typeof c=="object"){let R=se(c);y=ar(y,structuredClone(R))}let{mode:k,autoDefine:f,applyGlobalStyles:$,manageTheme:Z,themeStorageKey:A,preloadStyles:H,criticalLayers:D,managerURL:le,manager:Q,preset:we,design:L,enhancers:W,log:X,...E}=r;d={...E,design:y,preset:l.name,log:X||o}}else if(a){let{log:h,...g}=r;d={design:structuredClone(g),log:h||o}}else{let h=t?.default||Object.values(t||{}).find(g=>lt(g.name)==="default");if(!h)throw new Error("PDS default preset not available");l={id:h.id||"default",name:h.name||"Default"},d={design:structuredClone(h),preset:l.name,log:o}}return{generatorConfig:d,enhancers:s,presetInfo:l}}function sr({manageTheme:r,themeStorageKey:e,applyResolvedTheme:t,setupSystemListenerIfNeeded:o}){let a="light",i=null;if(r&&typeof window<"u"){try{i=localStorage.getItem(e)||null}catch{i=null}try{t?.(i),o?.(i)}catch{}i?i==="system"?a=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a=i:a=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}return{resolvedTheme:a,storedTheme:i}}function dt(r,{resolvePublicAssetURL:e}){let t=!!(r?.public?.root||r?.static?.root),o=e(r);return!t&&tr&&(o=tr),Oe(je(o))}async function nr(r,{baseEnhancers:e=[]}={}){let{autoDefineBaseURL:t="/auto-define/",autoDefinePreload:o=[],autoDefineMapper:a=null,enhancers:i=[],autoDefineOverrides:s=null,autoDefinePreferModule:n=!0}=r,c=(()=>{let d=new Map;return(e||[]).forEach(l=>d.set(l.selector,l)),(i||[]).forEach(l=>d.set(l.selector,l)),Array.from(d.values())})(),p=null;if(typeof window<"u"&&typeof document<"u"){let d=null;try{let f=await Promise.resolve().then(()=>(er(),Xt));d=f?.AutoDefiner||f?.default?.AutoDefiner||f?.default||null}catch(f){console.warn("AutoDefiner not available:",f?.message||f)}let l=f=>{switch(f){case"pds-tabpanel":return"pds-tabstrip.js";default:return`${f}.js`}},{mapper:h,...g}=s&&typeof s=="object"?s:{},k={baseURL:t&&Oe(je(t,{preferModule:n})),predefine:o,scanExisting:!0,observeShadows:!0,patchAttachShadow:!0,debounceMs:16,enhancers:c,onError:(f,$)=>{if(typeof f=="string"&&f.startsWith("pds-")){let A=["pds-form","pds-drawer"].includes(f),H=$?.message?.includes("#pds/lit")||$?.message?.includes("Failed to resolve module specifier");A&&H?console.error(`\u274C PDS component <${f}> requires Lit but #pds/lit is not in import map.
|
|
3196
3196
|
Add this to your HTML <head>:
|
|
3197
3197
|
<script type="importmap">
|
|
3198
3198
|
{ "imports": { "#pds/lit": "./path/to/lit.js" } }
|
|
3199
3199
|
<\/script>
|
|
3200
|
-
See: https://github.com/pure-ds/core#lit-components`):console.warn(`\u26A0\uFE0F PDS component <${f}> not found. Assets may not be installed.`)}else console.error(`\u274C Auto-define error for <${f}>:`,$)},...g,mapper:f=>{if(customElements.get(f))return null;if(typeof a=="function")try{let $=a(f);return $===void 0?l(f):$}catch($){return console.warn("Custom autoDefine.mapper error; falling back to default:",$?.message||$),l(f)}return l(f)}};d&&(p=new d(k),o.length>0&&typeof d.define=="function"&&await d.define(...o,{baseURL:t,mapper:k.mapper,onError:k.onError}))}return{autoDefiner:p,mergedEnhancers:c}}var
|
|
3201
|
-
`)!==-1||r.indexOf(" ")!==-1||r.startsWith("#/"))return!1;let e=new URL(r,window.location.origin);return e.protocol==="http:"||e.protocol==="https:"}catch{return!1}}function
|
|
3202
|
-
<div title="${s.tooltip||""}" data-index="${o}" class="${`${
|
|
3200
|
+
See: https://github.com/pure-ds/core#lit-components`):console.warn(`\u26A0\uFE0F PDS component <${f}> not found. Assets may not be installed.`)}else console.error(`\u274C Auto-define error for <${f}>:`,$)},...g,mapper:f=>{if(customElements.get(f))return null;if(typeof a=="function")try{let $=a(f);return $===void 0?l(f):$}catch($){return console.warn("Custom autoDefine.mapper error; falling back to default:",$?.message||$),l(f)}return l(f)}};d&&(p=new d(k),o.length>0&&typeof d.define=="function"&&await d.define(...o,{baseURL:t,mapper:k.mapper,onError:k.onError}))}return{autoDefiner:p,mergedEnhancers:c}}var ht=class extends EventTarget{},m=new ht;m.initializing=!1;m.currentPreset=null;m.debug=!1;var cr=(r="")=>String(r).toLowerCase().replace(/&/g," and ").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,""),pt=function(r="log",e,...t){let o=!!(m.registry&&!m.registry.isLive),a=(this?.debug||this?.design?.debug||m.debug||!1)===!0;if(o){if(!m.debug)return}else if(!a&&r!=="error"&&r!=="warn")return;let i=console[r]||console.log;t.length>0?i(e,...t):i(e)};async function co(r,e={}){if(e?.runtimeConfig===!1||typeof fetch!="function")return null;let t=e?.runtimeConfigURL||`${r}pds-runtime-config.json`;try{let o=await fetch(t,{cache:"no-store"});return o.ok?await o.json():null}catch{return null}}m.registry=ie;m.adoptLayers=Jt;m.adoptPrimitives=Vt;m.createStylesheet=Kt;m.isLiveMode=()=>ie.isLive;m.ask=Yt;m.toast=P;function lr(r){let e=typeof CustomEvent=="function";try{let t=e?new CustomEvent("pds:ready",{detail:r}):new Event("pds:ready");m.dispatchEvent(t)}catch{}if(typeof document<"u")if(e){let t={detail:r,bubbles:!0,composed:!0};try{document.dispatchEvent(new CustomEvent("pds:ready",t))}catch{}try{document.dispatchEvent(new CustomEvent("pds-ready",t))}catch{}}else{try{document.dispatchEvent(new Event("pds:ready"))}catch{}try{document.dispatchEvent(new Event("pds-ready"))}catch{}}}typeof window<"u"&&(window.PDS=m);var ut="pure-ds-theme",Y=null,ve=null;function He(r){try{if(typeof document>"u")return;let e="light";r?r==="system"?e=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e=r:e=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",document.documentElement.setAttribute("data-theme",e)}catch{}}function We(r){try{if(Y&&ve){try{typeof Y.removeEventListener=="function"?Y.removeEventListener("change",ve):typeof Y.removeListener=="function"&&Y.removeListener(ve)}catch{}Y=null,ve=null}if(r==="system"&&typeof window<"u"&&window.matchMedia){let e=window.matchMedia("(prefers-color-scheme: dark)"),t=o=>{let a=o?.matches===void 0?e.matches:o.matches;try{let i=a?"dark":"light";document.documentElement.setAttribute("data-theme",i),m.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:i,source:"system"}}))}catch{}};Y=e,ve=t,typeof e.addEventListener=="function"?e.addEventListener("change",t):typeof e.addListener=="function"&&e.addListener(t)}}catch{}}Object.defineProperty(m,"theme",{get(){try{return typeof window>"u"?null:localStorage.getItem(ut)||null}catch{return null}},set(r){try{if(typeof window>"u")return;r==null?localStorage.removeItem(ut):localStorage.setItem(ut,r),He(r),We(r),m.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:r,source:"api"}}))}catch{}}});m.defaultEnhancers=st;async function lo(r){let e=r&&r.mode||"live",{mode:t,...o}=r||{};if(e==="static")return po(o);let a=dt(o,{resolvePublicAssetURL:nt}),i=o?.managerURL||o?.public?.managerURL||o?.manager?.url||new URL("core/pds-manager.js",a).href||new URL("./pds-manager.js",import.meta.url).href,{startLive:s}=await import(i);return s(m,o,{emitReady:lr,applyResolvedTheme:He,setupSystemListenerIfNeeded:We})}m.start=lo;async function po(r){if(!r||typeof r!="object")throw new Error("PDS.start({ mode: 'static', ... }) requires a valid configuration object");let e=r.applyGlobalStyles??!0,t=r.manageTheme??!0,o=r.themeStorageKey??"pure-ds-theme",a=r.staticPaths??{},i=dt(r,{resolvePublicAssetURL:nt}),s=r&&r.autoDefine||null,n;s&&s.baseURL?n=Oe(je(s.baseURL,{preferModule:!1})):n=`${i}components/`;let c=s&&Array.isArray(s.predefine)&&s.predefine||[],p=s&&typeof s.mapper=="function"&&s.mapper||null;try{or(m);let{resolvedTheme:d}=sr({manageTheme:t,themeStorageKey:o,applyResolvedTheme:He,setupSystemListenerIfNeeded:We}),l=await co(i,r),h=l?.config?.design||l?.design||null,g=l?.config?.preset||l?.preset||"default",y=l?.presetId||cr(g)||"default",k=h?{[String(y).toLowerCase()]:h,...String(y).toLowerCase()!=="default"?{default:h}:{}}:null,f=r?.design&&typeof r.design=="object"?se(r.design):null,$=cr(r?.preset||"default")||"default",Z=f?{[String($).toLowerCase()]:f,...String($).toLowerCase()!=="default"?{default:f}:{}}:null,A=k||r?.presets||Z||{};if(!Object.keys(A||{}).length)throw new Error("PDS static mode requires preset data. Run pds:build or provide config.presets/config.design.");let H=l?.config?{...l.config,...r,preset:r?.preset||y,design:f||h||l?.config?.design}:r,D=ir(H,{},{presets:A,defaultLog:pt}),le=D.enhancers,Q={tokens:`${i}styles/pds-tokens.css.js`,primitives:`${i}styles/pds-primitives.css.js`,components:`${i}styles/pds-components.css.js`,utilities:`${i}styles/pds-utilities.css.js`,styles:`${i}styles/pds-styles.css.js`},we=l?.paths||{};if(a={...Q,...we,...a},m.registry.setStaticMode(a),e&&typeof document<"u")try{let E=await m.registry.getStylesheet("styles");if(E){E._pds=!0;let R=(document.adoptedStyleSheets||[]).filter(b=>b._pds!==!0);document.adoptedStyleSheets=[...R,E]}}catch(E){pt.call(m,"warn","Failed to apply static styles:",E)}let L=null,W=[];try{let E=await nr({autoDefineBaseURL:n,autoDefinePreload:c,autoDefineMapper:p,enhancers:le,autoDefineOverrides:s||null,autoDefinePreferModule:!(s&&s.baseURL)},{baseEnhancers:st});L=E.autoDefiner,W=E.mergedEnhancers||[]}catch(E){pt.call(m,"error","\u274C Failed to initialize AutoDefiner/Enhancers (static):",E)}let X=se(r);return m.currentConfig=Object.freeze({mode:"static",...structuredClone(X),design:structuredClone(D.generatorConfig.design),preset:D.generatorConfig.preset,theme:d,enhancers:W}),lr({mode:"static",config:D.generatorConfig,theme:d,autoDefiner:L}),{config:D.generatorConfig,theme:d,autoDefiner:L}}catch(d){throw m.dispatchEvent(new CustomEvent("pds:error",{detail:{error:d}})),d}}var gt=He,mt=We;function ft(r){return r&&typeof r=="object"&&!Array.isArray(r)}function ne(r,e){let t={...r};return ft(r)&&ft(e)&&Object.keys(e).forEach(o=>{ft(e[o])?o in r?t[o]=ne(r[o],e[o]):Object.assign(t,{[o]:e[o]}):Object.assign(t,{[o]:e[o]})}),t}function dr(r){let e=r.replace(/['"]/g,"").trim();if(["system-ui","-apple-system","sans-serif","serif","monospace","cursive","fantasy","ui-sans-serif","ui-serif","ui-monospace","ui-rounded"].includes(e.toLowerCase()))return!0;let a=document.createElement("canvas").getContext("2d");if(!a)return!1;let i="mmmmmmmmmmlli",s="72px",n="monospace";a.font=`${s} ${n}`;let c=a.measureText(i).width;a.font=`${s} "${e}", ${n}`;let p=a.measureText(i).width;return c!==p}function uo(r){return r?r.split(",").map(o=>o.trim())[0].replace(/['"]/g,"").trim():null}async function ho(r,e={}){if(!r)return Promise.resolve();let{weights:t=[400,500,600,700],italic:o=!1}=e,a=uo(r);if(!a||dr(a))return Promise.resolve();let i=encodeURIComponent(a);return document.querySelector(`link[href*="fonts.googleapis.com"][href*="${i}"]`)?(console.log(`Font "${a}" is already loading or loaded`),Promise.resolve()):(console.log(`Loading font "${a}" from Google Fonts...`),new Promise((n,c)=>{let p=document.createElement("link");p.rel="stylesheet";let d=o?`ital,wght@0,${t.join(";0,")};1,${t.join(";1,")}`:`wght@${t.join(";")}`;p.href=`https://fonts.googleapis.com/css2?family=${i}:${d}&display=swap`,p.setAttribute("data-font-loader",a),p.onload=()=>{console.log(`Successfully loaded font "${a}"`),n()},p.onerror=()=>{console.warn(`Failed to load font "${a}" from Google Fonts`),c(new Error(`Failed to load font: ${a}`))},document.head.appendChild(p),setTimeout(()=>{dr(a)||console.warn(`Font "${a}" did not load within timeout`),n()},5e3)}))}async function pr(r){if(!r)return Promise.resolve();let e=new Set;r.fontFamilyHeadings&&e.add(r.fontFamilyHeadings),r.fontFamilyBody&&e.add(r.fontFamilyBody),r.fontFamilyMono&&e.add(r.fontFamilyMono);let t=Array.from(e).map(o=>ho(o).catch(a=>{console.warn(`Could not load font: ${o}`,a)}));await Promise.all(t)}function ur(r){return new DOMParser().parseFromString(r,"text/html").body.childNodes}function hr(r,e=100){let t;return function(...a){let i=()=>{clearTimeout(t),r(...a)};clearTimeout(t),t=setTimeout(i,e)}}function Ue(r){setTimeout(r,0)}function gr(r){try{if(typeof r!="string"||r.indexOf(`
|
|
3201
|
+
`)!==-1||r.indexOf(" ")!==-1||r.startsWith("#/"))return!1;let e=new URL(r,window.location.origin);return e.protocol==="http:"||e.protocol==="https:"}catch{return!1}}function mr(r,e,t){let o=window.screen.width/2-e/2,a=window.screen.height/2-t/2;return window.open(r,"",`toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=${e}, height=${t}, top=${a}, left=${o}`)}var bt={result:"ac-suggestion",item:"ac-itm"},ce=class r extends EventTarget{constructor(e,t,o){super(),this.settings={emptyResultsText:"",...o},this.container=e,this.input=t,this.input.setAttribute("autocomplete","off"),this.categories=o.categories||{},this.caches=new Map,Ue(this.attach.bind(this))}static connect(e,t){let o=e.target;if(!o._autoComplete){if(!t?.categories)throw Error("Missing autocomplete settings");o._autoComplete=new r(o.parentNode,o,t),e.type==="focus"&&setTimeout(()=>{o._autoComplete.focusHandler(e)},100)}return o._autoComplete}on(e,t){return this.input.addEventListener(e,t),this}attach(){this.resultsDiv=document.createElement("div"),this.resultsDiv.title="",this.resultsDiv.classList.add(bt.result),this.container.offsetWidth>100&&(this.resultsDiv.style.width=this.container.offsetWidth),this.resultsDiv.addEventListener("mousedown",this.resultClick.bind(this)),this.container.classList.add("ac-container"),this.input.classList.add("ac-input");let e=getComputedStyle(this.input);this.container.style.setProperty("--ac-bg-default",e.backgroundColor),this.container.style.setProperty("--ac-color-default",e.color);let t=getComputedStyle(this.input).accentColor;t!=="auto"&&this.container.style.setProperty("--ac-accent-color",t),(this.container?.shadowRoot??this.container).appendChild(this.resultsDiv),this.controller().clear("attach"),this.on("input",hr(this.inputHandler.bind(this),this.settings.throttleInputMs??300)).on("focus",this.focusHandler.bind(this)).on("focusout",this.blurHandler.bind(this)).on("keyup",this.keyUpHandler.bind(this)).on("keydown",this.keyDownHandler.bind(this))}controller(){let e=this.internalController();return typeof this.settings.controller=="function"&&(e=this.settings.controller(this)??e),e}internalController(){return{show:this.show.bind(this),hide:this.hide.bind(this),clear:this.clear.bind(this),empty:()=>{}}}moveResult(e){this.controller().show();let t=this.acItems.length;this.rowIndex=this.rowIndex+e,this.rowIndex<=0?this.rowIndex=0:this.rowIndex>t-1&&(this.rowIndex=0);for(let a of this.acItems)a.classList.remove("selected");let o=this.getSelectedDiv();o?(o.classList.add("selected"),o.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})):this.focusHandler({target:this.input})}getSelectedDiv(){return this.resultsDiv.querySelector(`div:nth-child(${this.rowIndex+1})`)}selectResult(e){if(e=e||this.getSelectedDiv(),e){let t=parseInt(e.getAttribute("data-index"));this.resultClicked=!0;let o=this.results[t],a=this.categories[o.category]??{};a.action=a.action??this.setText.bind(this),a.newTab&&(this.tabWindow=mr("about:blank"));let i={...o,search:this.input.value};e.classList.add("ac-active"),setTimeout(()=>{this.controller().hide("result-selected"),i.action?i.action(i):(a.action(i),a.newTab&&(i.url?this.tabWindow.location.href=i.url:this.tabWindow.close()));var s=new Event("change",{bubbles:!0});this.input.dispatchEvent(s),this.controller().clear("result-selected");let n=new Event("result-selected");n.detail=i,this.input.dispatchEvent(n)},0)}}setText(e){this.container.autoCompleteInput||(this.container.value=e.text),this.controller().hide("settext")}resultClick(e){this.selectResult(e.target.closest(`.${bt.item}`))}blurHandler(){setTimeout(()=>{this.resultClicked||this.controller().clear("blurred"),this.resultClicked=!1},100)}clear(){this.settings.debug||this.resultsDiv&&(this.resultsDiv.innerHTML="",this.controller().hide("clear"),this.cacheTmr&&clearTimeout(this.cacheTmr),this.cacheTmr=setTimeout(()=>{this.caches.clear()},60*1e3*5))}show(){if(!this.resultsDiv.classList.contains("ac-active")){let e=this.getViewBounds();this.resultsDiv.style.position="absolute",e.rect.width>100&&(this.resultsDiv.style.width=`${e.rect.width}px`),this.settings.direction=this.settings.direction??e.suggestedDirection,this.resultsDiv.setAttribute("data-direction",this.settings.direction),this.settings.direction==="up"?(this.resultsDiv.style.top="unset",this.resultsDiv.style.bottom=`${e.rect.height+20}px`,this.rowIndex=this.acItems.length):(this.resultsDiv.style.bottom="unset",this.resultsDiv.style.top=`${e.rect.height}px`,this.rowIndex=-1),this.resultsDiv.style.maxWidth="unset",this.resultsDiv.classList.toggle("ac-active",!0)}}getViewBounds(){let e=this.input.getBoundingClientRect();return{rect:e,suggestedDirection:e.top+e.height+500>window.innerHeight?"up":"down"}}hide(){this.resultsDiv.classList.toggle("ac-active",!1)}empty(){this.resultsDiv.innerHTML=`<div class="ac-empty">${this.settings.emptyResultsText}</div>`,this.controller().show()}inputHandler(e){this.cacheTmr&&clearTimeout(this.cacheTmr);let t={search:e.target.value,categories:this.categories};this.container.classList.add("search-running"),this.getItems(t,e).then(o=>{this.controller().clear("new-results"),this.resultsHandler(o,t),this.container.classList.remove("search-running")})}keyDownHandler(e){switch(e.key){case"Enter":e.stopPropagation(),e.preventDefault();break;case"ArrowDown":Ue(this.moveResult(1));break;case"ArrowUp":Ue(this.moveResult(-1));break}}keyUpHandler(e){switch(e.key){case"Escape":this.controller().hide("escape");break;case"Enter":this.getSelectedDiv()&&(this.container.preventEnter=!0,e.stopPropagation(),e.preventDefault(),this.selectResult(),setTimeout(()=>{this.container.preventEnter=!1},10));break;default:break}}focusHandler(e){this.controller().clear("focus");let t=e.target.value;this.suggest(t,e)}suggest(e,t){this.input.focus();let o={suggest:!0,search:e||"",categories:this.categories};this.getItems(o,t).then(a=>{this.input.dispatchEvent(new CustomEvent("show-results",{detail:{results:a}})),this.resultsHandler(a,o)})}sort(e,t){return e.sort((o,a)=>{let i=t.categories[o.category],s=t.categories[a.category],n=typeof i.sortIndex=="function"?i.sortIndex(t):i.sortIndex??0;return(typeof s.sortIndex=="function"?s.sortIndex(t):s.sortIndex??0)>n?1:-1})}resultsHandler(e,t){this.results=e,this.rowIndex=-1;let o=0,a=(i,s)=>`
|
|
3202
|
+
<div title="${s.tooltip||""}" data-index="${o}" class="${`${bt.item} cat-${s.category} ${s.class??""}`.trim()}">
|
|
3203
3203
|
${this.handleImageOrIcon(s)}
|
|
3204
3204
|
<span class="text">${this.formatResultItem(s,t,i)}</span>
|
|
3205
3205
|
${this.settings.hideCategory?"":`<span class="category">${s.category||""}</span>`}
|
|
3206
|
-
</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(
|
|
3206
|
+
</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(ur(a(s,i))[0])),o++}),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,o){let a=typeof e=="string"?{text:e}:e,i=a.text;return t.search&&(i=i.replace("%search%",t.search),a.description=a.description?.replace("%search%",t.search)),i=this.highlight(i,t.search),a.description&&(i=`<div>${i}</div><small>${a.description}</small>`),o.format&&(i=o.format({item:a,result:i,options:t})),i}highlight(e,t){var o=new RegExp("("+t+")","gi");return e.replace(o,'<span class="txt-hl">$1</span>')}async getItems(e,t){this.aborter&&this.aborter.abort();let o=this.caches.get(e.search);if(o)return o;let a=this.settings.map,i=c=>(typeof c=="string"&&(c={text:c}),c),s=c=>a?c.map(p=>({text:p[a]})):c.map(p=>i(p)),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 p=d=>{d=this.sort(d,e),this.settings.cache!==!1&&this.caches.set(e.search,d),c(d)};if(gr(this.items)){if(this.settings.minlength>0&&(!e.search||e.search.length<this.settings.minlength)){p([]);return}let d=this.formatSearch(this.items,e);fetch(d).then(l=>{if(l.status===200){l.json().then(h=>{h=s(h),p(n(h.filter(g=>this.isMatch(e,g))))});return}throw Error(`HTTP error ${l.status} - ${d}`)})}else if(Array.isArray(this.items)){let d=!0;this.items=this.items.map(l=>typeof l=="string"?{text:l}:(d=!1,l)),d&&this.container.classList.add("simple"),p(n(s(this.items)))}else if(typeof this.items=="function")e.control=this.container,Promise.resolve(this.items(e,t)).then(l=>{l=l.map(h=>i(h)),l=s(l),p(l)});else return p(Promise.resolve(this.items.apply(this,e)))})}async items(e){let t=[];e.results=[],e.signal=this.aborterSignal;for(var o in e.categories){let a=e.categories[o];if(a.trigger=a.trigger??(()=>!0),e.results=t,a.trigger(e)){let i=[];try{i=await a.getItems(e)}catch(s){console.warn(`Error loading items for omniBox category '${o}'.`,s)}t=t.concat(i.map(s=>(s.category=o,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(o){if(!e.search)return!0;if(o.hidden)return!1;let i=(t?o[t]:o).match(new RegExp(e.search,"gi"));if(i)return i;if(o.config?.tags)return o.config.tags.some(s=>s.match(new RegExp(e.search,"gi")))}}};function fr(r){function e(a,i,s){let n=a[0];if(n==="colors")return i==="scheme"?"string":"color";if(n==="spacing"||n==="radius"||n==="borderWidths")return"dimension";if(n==="typography"){let c=a[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"||a.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(a){return a!==null&&typeof a=="object"&&!Array.isArray(a)}function o(a,i=[]){if(a==null)return a;if(Array.isArray(a))return a.map((p,d)=>o(p,i.concat(String(d))));if(t(a)){if(Object.prototype.hasOwnProperty.call(a,"value")&&(Object.prototype.hasOwnProperty.call(a,"type")||Object.keys(a).length===1))return a;let p={};for(let[d,l]of Object.entries(a))p[d]=o(l,i.concat(d));return p}let s=i[i.length-1]??"",n=e(i,s,a),c=a;if(n==="number"&&typeof c=="string"){let p=Number(c);Number.isNaN(p)||(c=p)}return n?{value:c,type:n}:{value:c}}return o(r,[])}var br="pure-ds-config";customElements.define("pds-config-form",class extends M{#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{gt(m.theme),mt(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(j.default),e=new ae({design:r}),t=e.generateSpacingTokens(r.spatialRhythm||{});Object.entries(t).forEach(([s,n])=>{try{this.style.setProperty(`--spacing-${s}`,n)}catch{}});let o=r.spatialRhythm&&r.spatialRhythm.baseUnit||16;this.style.setProperty("--base-unit",`${o}px`);let a=e.generateTypographyTokens(r.typography||{});a.fontSize&&Object.entries(a.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`),a.fontFamily&&Object.entries(a.fontFamily).forEach(([s,n])=>{this.style.setProperty(`--font-family-${s}`,n)}),a.lineHeight&&Object.entries(a.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 a=0;a<r.length;a++)if(!this._isEqual(r[a],e[a]))return!1;return!0}let t=Object.keys(r),o=Object.keys(e);t.length,o.length;for(let a of new Set([...t,...o]))if(!this._isEqual(r[a],e[a]))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={},o=new Set([...Object.keys(e)]);for(let a of o){let i=this._deepDiff(r[a],e[a]);i!==void 0&&(t[a]=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=j?.[e]||j?.default;return JSON.parse(JSON.stringify(t||j.default))}loadConfig(){let r=localStorage.getItem(br);if(r)try{let e=JSON.parse(r);if(e&&("preset"in e||"design"in e)){let o=e.preset||"default",a=this._resolvePresetBase(o),i=ne(a,e.design||{});return this._stored={preset:o,design:e.design||{}},this._legacy=!1,i}let t=ne(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)||{},o={preset:r,design:t};localStorage.setItem(br,JSON.stringify(o)),this._stored=o,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(j.default);if(r&&this.config){let a=this._stored&&this._stored.preset||"default",i=this._resolvePresetBase(a);e=ne(i,this.config)}if(e.typography)try{await pr(e.typography)}catch(a){console.warn("Failed to load some fonts from Google Fonts:",a)}try{let a=Ne(e);if(!a.ok){if(this.validationIssues=a.issues,!this._validationToastId){let i=a.issues.slice(0,3).map(s=>`\u2022 ${s.message}`).join(`
|
|
3207
3207
|
`);this._validationToastId=await m.toast(`Design has accessibility issues. Fix before applying.
|
|
3208
|
-
${i}`,{type:"error",persistent:!0})}return}this.validationIssues=[],this._validationToastId&&(document.querySelector("#global-toaster")?.dismissToast(this._validationToastId),this._validationToastId=null)}catch(a){console.warn("Validation failed unexpectedly:",a)}let t=m.theme||null,o={design:structuredClone(e)};t&&(o.theme=t),this.generator=new ae(o),
|
|
3208
|
+
${i}`,{type:"error",persistent:!0})}return}this.validationIssues=[],this._validationToastId&&(document.querySelector("#global-toaster")?.dismissToast(this._validationToastId),this._validationToastId=null)}catch(a){console.warn("Validation failed unexpectedly:",a)}let t=m.theme||null,o={design:structuredClone(e)};t&&(o.theme=t),this.generator=new ae(o),Gt(this.generator);try{gt(m.theme),mt(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 o=this.#o-(e-this.#e);this.#r=setTimeout(()=>{this.#r=null,t()},o)}}async toggleInspectorMode(){this.inspectorMode=!this.inspectorMode,this.dispatchInspectorModeChange(),await m.toast(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[o,a]of Object.entries(r)){let i=e?`${e}/${o}`:`/${o}`;a&&typeof a=="object"&&!Array.isArray(a)?Object.assign(t,this.flattenConfig(a,i)):t[i]=a}return t}getSchemaProperties(r,e=""){let t=new Set;if(!r||!r.properties)return t;for(let[o,a]of Object.entries(r.properties)){let i=e?`${e}/${o}`:`/${o}`;t.add(i),a.type==="object"&&a.properties&&this.getSchemaProperties(a,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),o={};for(let[a,i]of Object.entries(t))e.has(a)&&i!==null&&i!==void 0&&(o[a]=i);return o}handleFormChange=async 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 o={},a=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(a),l=o;for(let h=0;h<d.length-1;h++){let g=d[h];(!l[g]||typeof l[g]!="object")&&(l[g]={}),l=l[g]}l[d[d.length-1]]=c}else if(n.includes(".")){let p=n.split("."),d=o;for(let l=0;l<p.length-1;l++)(!d[p[l]]||typeof d[p[l]]!="object")&&(d[p[l]]={}),d=d[p[l]];d[p[p.length-1]]=c}else o[n]=c;console.log("Nested values:",o);let i=ne(structuredClone(this.config),o),s=Ne(i);if(!s.ok){if(this.validationIssues=s.issues,!this._validationToastId){let n=s.issues.slice(0,3).map(c=>`\u2022 ${c.message}`).join(`
|
|
3209
3209
|
`);this._validationToastId=await m.toast(`Design has accessibility issues. Fix before saving.
|
|
3210
|
-
${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),await m.toast("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)),o=
|
|
3210
|
+
${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),await m.toast("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)),o=Ne(t);if(!o.ok){if(this.validationIssues=o.issues,!this._validationToastId){let a=o.issues.slice(0,3).map(i=>`\u2022 ${i.message}`).join(`
|
|
3211
3211
|
`);this._validationToastId=await m.toast(`Preset "${r.name}" has accessibility issues \u2014 not applied.
|
|
3212
3212
|
${a}`,{type:"error",persistent:!0})}return}this.validationIssues=[];try{this._validationToastId&&(document.querySelector("#global-toaster")?.dismissToast(this._validationToastId),this._validationToastId=null)}catch{}this.config=t,this._stored={preset:(r.id||r.name||"").toLowerCase(),design:{}},this.formValues=this.filterConfigForSchema(this.config),this.saveConfig(),this.applyStyles(!0),await m.toast(`"${r.name}" preset loaded successfully!`,{type:"success",duration:3e3})}};async handleThemeChange(r){try{let e=r.target.value;m.theme=e,this.applyStyles(!0),await m.toast(`Theme set to ${e}`,{type:"info",duration:1200})}catch(e){console.warn("Failed to change theme:",e)}}handleDownload=r=>{let e,t,o;switch(r){case"css":e=this.generator.layeredCSS,t="pure-ds.css",o="text/css";break;case"config":e=`// Pure Design System Configuration
|
|
3213
3213
|
// Generated: ${new Date().toISOString()}
|
|
@@ -3215,7 +3215,7 @@ ${a}`,{type:"error",persistent:!0})}return}this.validationIssues=[];try{this._va
|
|
|
3215
3215
|
import { PDS } from 'pure-ds';
|
|
3216
3216
|
|
|
3217
3217
|
export const pdsConfig = ${JSON.stringify(this.config,null,2)};
|
|
3218
|
-
`,t="pds.config.js",o="text/javascript";break;case"tokens":let n=
|
|
3218
|
+
`,t="pds.config.js",o="text/javascript";break;case"tokens":let n=fr(this.generator.generateTokens());e=JSON.stringify(n,null,2),t="design-tokens.json",o="application/json";break}let a=new Blob([e],{type:o}),i=URL.createObjectURL(a),s=document.createElement("a");s.href=i,s.download=t,s.click(),URL.revokeObjectURL(i)};render(){return this.schema?S`
|
|
3219
3219
|
<div class="designer-container">
|
|
3220
3220
|
<div class="designer-toolbar">
|
|
3221
3221
|
<label data-toggle id="mode-toggle">
|
|
@@ -3405,7 +3405,7 @@ export const pdsConfig = ${JSON.stringify(this.config,null,2)};
|
|
|
3405
3405
|
`;await a.show(n,{header:i});let c=await this.highlightWithShiki(r),p=S`
|
|
3406
3406
|
${s}
|
|
3407
3407
|
<div class="code-block-wrapper">
|
|
3408
|
-
<pre class="code-block"><code class="language-html">${
|
|
3408
|
+
<pre class="code-block"><code class="language-html">${Ie(c)}</code></pre>
|
|
3409
3409
|
</div>
|
|
3410
3410
|
`;await document.getElementById("global-drawer").show(p,{header:i}),setTimeout(()=>{let l=document.getElementById("global-drawer")?.querySelector("#copyCodeBtn");l&&(l.onclick=()=>{let h=r;e.length>0&&(h=`<!-- Lit Properties:
|
|
3411
3411
|
`+e.map(g=>` ${g.name}=${JSON.stringify(g.value)}`).join(`
|
|
@@ -5330,7 +5330,7 @@ export const pdsConfig = ${JSON.stringify(this.config,null,2)};
|
|
|
5330
5330
|
handling in the design system.
|
|
5331
5331
|
</figcaption>
|
|
5332
5332
|
</figure>
|
|
5333
|
-
`}async showDoc(r){let e=`/${r}`;try{let a=(await(await fetch(e,{cache:"no-store"})).text()).trim(),i;if(a.startsWith("<"))i=`<div class="docs-error">Failed to load README at ${e}. Ensure readme.md exists under public/</div>`;else try{let n=await this.getShowdownConverter();i=n?n.makeHtml(a):`<pre>${this.escapeHTML(a)}</pre>`}catch{i=`<pre>${this.escapeHTML(a)}</pre>`}document.getElementById("global-drawer").show(S`${
|
|
5333
|
+
`}async showDoc(r){let e=`/${r}`;try{let a=(await(await fetch(e,{cache:"no-store"})).text()).trim(),i;if(a.startsWith("<"))i=`<div class="docs-error">Failed to load README at ${e}. Ensure readme.md exists under public/</div>`;else try{let n=await this.getShowdownConverter();i=n?n.makeHtml(a):`<pre>${this.escapeHTML(a)}</pre>`}catch{i=`<pre>${this.escapeHTML(a)}</pre>`}document.getElementById("global-drawer").show(S`${Ie(i)}`,{header:S`<h3>PDS Documentation</h3>`})}catch(t){console.error("Error fetching README:",t);let o=document.getElementById("global-toaster");await m.toast("Error loading docs. See console.",{type:"error"})}}async handleTabChange(r){await m.toast(`Switched to tab: ${r.detail.newTab}`,{type:"info"})}openDrawer(){document.getElementById("global-drawer").show(S`
|
|
5334
5334
|
<figure class="media-figure">
|
|
5335
5335
|
<img
|
|
5336
5336
|
class="media-image"
|
|
@@ -5393,7 +5393,7 @@ export const pdsConfig = ${JSON.stringify(this.config,null,2)};
|
|
|
5393
5393
|
<pds-config-form slot="left" show-inspector show-preset-selector show-theme-selector></pds-config-form>
|
|
5394
5394
|
<pds-demo slot="right"></pds-demo>
|
|
5395
5395
|
</pds-splitpanel>
|
|
5396
|
-
`}});await m.start(
|
|
5396
|
+
`}});await m.start(Be);document.body.innerHTML=`
|
|
5397
5397
|
<header>
|
|
5398
5398
|
<pds-toaster id="global-toaster"></pds-toaster>
|
|
5399
5399
|
</header>
|