ds-one 0.2.5-alpha.8 → 0.2.5-alpha.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- function as(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigator,e=window,s=t&&(t.userAgent||t.vendor)||e&&e.opera||"",n=/Mobile|Android|iP(ad|hone|od)|IEMobile|BlackBerry|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)|Windows Phone|Phone|Tablet/i.test(s),i=(t&&t.maxTouchPoints||0)>1,o=e?Math.min(e.innerWidth||0,e.innerHeight||0)<=820:!1;return n||i&&o}function ls(){let t=as(),e=navigator,s=window,r=(e&&e.maxTouchPoints||0)>1,i=typeof document<"u"?document.documentElement.clientWidth:s?.innerWidth||0,o=typeof document<"u"?document.documentElement.clientHeight:s?.innerHeight||0,p=t&&Math.min(i,o)>=600;return{isMobile:t,isTablet:p,isDesktop:!t,isTouchCapable:r,deviceType:t?p?"tablet":"mobile":"desktop",userAgent:e&&(e.userAgent||e.vendor)||"",screenWidth:i,screenHeight:o}}function Ve(){let t=ls();if(t.isMobile&&typeof document<"u"){let n=t.screenWidth/280;document.documentElement.style.setProperty("--sf",n.toFixed(3)),document.documentElement.style.setProperty("--sf",n.toFixed(3)),console.log(`[DS one] Mobile device detected - ${t.deviceType} (${t.screenWidth}x${t.screenHeight}), scaling factor: ${n.toFixed(2)}`)}else typeof document<"u"&&(document.documentElement.style.setProperty("--sf","1"),document.documentElement.style.setProperty("--sf","1")),console.log(`[DS one] Desktop device detected (${t.screenWidth}x${t.screenHeight})`);return typeof window<"u"&&window.DS_ONE_DEBUG&&console.log("[DS one] Device Info:",{type:t.deviceType,isMobile:t.isMobile,isTablet:t.isTablet,isDesktop:t.isDesktop,isTouchCapable:t.isTouchCapable,viewport:`${t.screenWidth}x${t.screenHeight}`,userAgent:t.userAgent}),t}if(typeof window<"u"){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{Ve()}):Ve();let t;window.addEventListener("resize",()=>{clearTimeout(t),t=setTimeout(()=>{Ve()},100)})}var cs={},mt=["da","nb","sv","pt","es","zh","ko","ja","en","de"],ds=new Map(mt.map((t,e)=>[t,e])),at={da:"Danish","da-dk":"Danish",nb:"Norwegian","nb-no":"Norwegian",sv:"Swedish","sv-se":"Swedish",de:"German","de-de":"German",en:"English","en-us":"English",pt:"Portuguese","pt-pt":"Portuguese","pt-br":"Portuguese (Brazil)",es:"Spanish","es-es":"Spanish","es-mx":"Spanish (Mexico)",zh:"Chinese","zh-hans":"Chinese (Simplified)","zh-hant":"Chinese (Traditional)",ja:"Japanese","ja-jp":"Japanese",ko:"Korean","ko-kr":"Korean"},lt=new Map,ct=!1,vt="./translations.json",dt=!1;function ut(t){if(!t)return null;let e=t.trim();return e?e.startsWith("./")||e.startsWith("../")||e.startsWith("/")||/^https?:\/\//i.test(e)?e:`./${e}`:null}function us(){if(typeof document>"u")return null;let e=document.querySelector("script[data-ds-one-translations]")?.getAttribute("data-ds-one-translations");if(e)return e;let s=document.querySelector('meta[name="ds-one:translations"]')?.getAttribute("content");if(s)return s;let n=document.querySelector('link[rel="ds-one-translations"]')?.getAttribute("href");return n||null}function hs(){let t=[],e=typeof window<"u"?window.DS_ONE_TRANSLATIONS_FILE:null,s=us(),n=ut(e??"");n&&t.push(n);let r=ut(s??"");return r&&!t.includes(r)&&t.push(r),t.length===0&&t.push(vt),t}function ps(t){return!t||typeof t!="object"?!1:Object.values(t).every(e=>e&&typeof e=="object")}async function fs(t){try{let e=await fetch(t);if(!e.ok)return null;let s=await e.json();return ps(s)?Object.keys(s).length===0?(console.warn(`[DS one] No languages found in ${t}`),null):s:(console.warn(`[DS one] Invalid translation format in ${t}. Expected object with language codes as keys.`),null)}catch{return null}}async function ht(){if(dt||(dt=!0,typeof window>"u"))return!1;if(window.DS_ONE_TRANSLATIONS&&Object.keys(window.DS_ONE_TRANSLATIONS).length>0)return console.log(`[DS one] Translations already loaded (${Object.keys(window.DS_ONE_TRANSLATIONS).length} languages), skipping auto-load`),!0;let t=hs();for(let e of t){let s=await fs(e);if(!s)continue;window.DS_ONE_TRANSLATIONS=s;let n=Object.keys(s);return console.log(`[DS one] External translations loaded from ${e}: ${n.length} language(s) \u2013 ${n.join(", ")}`),window.dispatchEvent(new CustomEvent("translations-ready")),!0}return console.info(`[DS one] No external translations found at ${t[0]??vt}. Using bundled translations.`),!1}function pe(){return typeof window<"u"&&window.DS_ONE_TRANSLATIONS?window.DS_ONE_TRANSLATIONS:cs}var E=pe(),Me=new Map,S="en";function F(t){return t?t.toLowerCase().split(/[-_]/)[0]??"":""}function pt(t){let e=F(t),s=ds.get(e);return typeof s=="number"?s:mt.length}function yt(t){return[...t].sort((e,s)=>{let n=pt(e),r=pt(s);return n!==r?n-r:e.localeCompare(s)})}function gs(t,e){let s=t?.replace("_","-");if(s)try{let n=lt.get(s);n||(n=new Intl.DisplayNames([s],{type:"language"}),lt.set(s,n));let r=e.replace("_","-"),i=n.of(r);if(i&&i!==r)return i;let o=n.of(F(r));if(o)return o}catch{ct||(console.info("[DS one] Intl.DisplayNames is not available, using fallback language names."),ct=!0)}}function ms(t){let e=t.toLowerCase().replace("_","-"),s=at[e];if(s)return s;let n=F(e);return at[n]}function bt(t,e={}){if(!t)return"";let s=[];e.locale&&s.push(e.locale),typeof navigator<"u"&&(Array.isArray(navigator.languages)&&s.push(...navigator.languages),navigator.language&&s.push(navigator.language)),s.push(S),s.push("en");let n=new Set;for(let o of s){if(!o||n.has(o))continue;n.add(o);let p=gs(o,t);if(p)return p}let r=ms(t);if(r)return r;let i=F(t);return i?i.toUpperCase():t}var ft={da:"da","da-dk":"da",no:"nb",nb:"nb","nb-no":"nb",nn:"nn","nn-no":"nn",sv:"sv","sv-se":"sv",pt:"pt","pt-pt":"pt","pt-br":"pt",es:"es","es-es":"es","es-mx":"es",zh:"zh","zh-cn":"zh","zh-hans":"zh","zh-tw":"zh","zh-hant":"zh",ko:"ko","ko-kr":"ko",ja:"ja","ja-jp":"ja",en:"en","en-us":"en","en-gb":"en",de:"de","de-de":"de"};function gt(t){if(!t)return null;let e=t.toLowerCase().replace("_","-"),s=ft[e];if(s)return s;let n=F(e),r=ft[n];return r||t}function vs(){if(typeof navigator>"u")return S;let t=navigator.language;if(t){let e=gt(t);if(e)return e}if(Array.isArray(navigator.languages))for(let e of navigator.languages){let s=gt(e);if(s)return s}return S}var ln=typeof window<"u"?window.localStorage?.getItem("ds-one:language")??void 0:void 0,k={value:localStorage.getItem("language")||vs(),set:function(t){this.value=t,localStorage.setItem("language",t),window.dispatchEvent(new CustomEvent("language-changed",{detail:{language:t},bubbles:!0,composed:!0}))}};typeof window<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{ht()}):ht());typeof window<"u"&&window.addEventListener("translations-ready",()=>{E=pe(),window.dispatchEvent(new CustomEvent("translations-loaded")),window.notionDataLoaded=!0;let t=k.value;window.dispatchEvent(new CustomEvent("language-changed",{detail:{language:t},bubbles:!0,composed:!0}))});setTimeout(()=>{window.dispatchEvent(new CustomEvent("translations-loaded")),window.notionDataLoaded=!0;let t=k.value;window.dispatchEvent(new CustomEvent("language-changed",{detail:{language:t},bubbles:!0,composed:!0}))},100);function T(t){let e=k.value;return E?.[e]?.[t]?E[e][t]:e!==S&&E?.[S]?.[t]?E[S][t]:(console.warn(`[DS one (Internationalization)] No translation found for key "${t}"`),t)}function cn(t,e=k.value){if(!t)return!1;let s=E?.[e];return!!(s&&Object.prototype.hasOwnProperty.call(s,t)||e!==S&&E?.[S]&&Object.prototype.hasOwnProperty.call(E[S],t))}function fe(t){return T(t)}async function wt(t,e=k.value){if(!t||!E||!E[e])return null;let s=E[e][t];return s||(e!==S&&E[S]?.[t]?E[S][t]:null)}function dn(t,e,s=k.value){if(!t)return;ys(s).set(t,e)}function ys(t){return Me.has(t)||Me.set(t,new Map),Me.get(t)}function un(){let t=pe();if(t&&Object.keys(t).length>0){let e=Object.keys(t);return Promise.resolve(yt(e))}return Promise.resolve([S])}function Re(){let t=pe();return t&&Object.keys(t).length>0?yt(Object.keys(t)):[S]}function hn(t,e){console.log(`Loading additional translations for ${t}:`,Object.keys(e).length,"keys")}function De(t){localStorage.setItem("language",t),k.set(t),window.dispatchEvent(new CustomEvent("language-changed",{detail:{language:t},bubbles:!0,composed:!0}))}function P(t){if(!(typeof window>"u"))try{let e=window.localStorage?.getItem("ds-one:preferences"),n={...e?JSON.parse(e):{},...t};window.localStorage?.setItem("ds-one:preferences",JSON.stringify(n))}catch(e){console.warn("ds-one: unable to persist preferences",e)}}var bs={da:"kr.",nb:"kr.",sv:"kr.",de:"\u20AC",en:"$",pt:"\u20AC",es:"\u20AC",zh:"\xA5",ja:"\xA5",ko:"\u20A9"};function gn(t){let{language:e,country:s}=t;if(s){let r=s.toUpperCase();if(r==="US"||r==="USA")return"$";if(r==="GB"||r==="UK")return"\xA3";if(r==="JP"||r==="JPN"||r==="CN"||r==="CHN")return"\xA5";if(r==="KR"||r==="KOR")return"\u20A9"}let n=e.toLowerCase().split(/[-_]/)[0];return bs[n]||"$"}var ws=Object.defineProperty,xs=(t,e,s)=>e in t?ws(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,Ue=(t,e,s)=>(xs(t,typeof e!="symbol"?e+"":e,s),s),_s=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)},We=(t,e)=>{if(Object(e)!==e)throw TypeError('Cannot use the "in" operator on this value');return t.has(e)},ge=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},xt=(t,e,s)=>(_s(t,e,"access private method"),s);function _t(t,e){return Object.is(t,e)}var w=null,G=!1,me=1,ve=Symbol("SIGNAL");function U(t){let e=w;return w=t,e}function $s(){return w}function Ss(){return G}var Fe={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function ye(t){if(G)throw new Error(typeof ngDevMode<"u"&&ngDevMode?"Assertion error: signal read during notification phase":"");if(w===null)return;w.consumerOnSignalRead(t);let e=w.nextProducerIndex++;if(W(w),e<w.producerNode.length&&w.producerNode[e]!==t&&Be(w)){let s=w.producerNode[e];be(s,w.producerIndexOfThis[e])}w.producerNode[e]!==t&&(w.producerNode[e]=t,w.producerIndexOfThis[e]=Be(w)?At(t,w,e):0),w.producerLastReadVersion[e]=t.version}function As(){me++}function $t(t){if(!(!t.dirty&&t.lastCleanEpoch===me)){if(!t.producerMustRecompute(t)&&!Ls(t)){t.dirty=!1,t.lastCleanEpoch=me;return}t.producerRecomputeValue(t),t.dirty=!1,t.lastCleanEpoch=me}}function St(t){if(t.liveConsumerNode===void 0)return;let e=G;G=!0;try{for(let s of t.liveConsumerNode)s.dirty||Es(s)}finally{G=e}}function Cs(){return w?.consumerAllowSignalWrites!==!1}function Es(t){var e;t.dirty=!0,St(t),(e=t.consumerMarkedDirty)==null||e.call(t.wrapper??t)}function Ts(t){return t&&(t.nextProducerIndex=0),U(t)}function ks(t,e){if(U(e),!(!t||t.producerNode===void 0||t.producerIndexOfThis===void 0||t.producerLastReadVersion===void 0)){if(Be(t))for(let s=t.nextProducerIndex;s<t.producerNode.length;s++)be(t.producerNode[s],t.producerIndexOfThis[s]);for(;t.producerNode.length>t.nextProducerIndex;)t.producerNode.pop(),t.producerLastReadVersion.pop(),t.producerIndexOfThis.pop()}}function Ls(t){W(t);for(let e=0;e<t.producerNode.length;e++){let s=t.producerNode[e],n=t.producerLastReadVersion[e];if(n!==s.version||($t(s),n!==s.version))return!0}return!1}function At(t,e,s){var n;if(Ge(t),W(t),t.liveConsumerNode.length===0){(n=t.watched)==null||n.call(t.wrapper);for(let r=0;r<t.producerNode.length;r++)t.producerIndexOfThis[r]=At(t.producerNode[r],t,r)}return t.liveConsumerIndexOfThis.push(s),t.liveConsumerNode.push(e)-1}function be(t,e){var s;if(Ge(t),W(t),typeof ngDevMode<"u"&&ngDevMode&&e>=t.liveConsumerNode.length)throw new Error(`Assertion error: active consumer index ${e} is out of bounds of ${t.liveConsumerNode.length} consumers)`);if(t.liveConsumerNode.length===1){(s=t.unwatched)==null||s.call(t.wrapper);for(let r=0;r<t.producerNode.length;r++)be(t.producerNode[r],t.producerIndexOfThis[r])}let n=t.liveConsumerNode.length-1;if(t.liveConsumerNode[e]=t.liveConsumerNode[n],t.liveConsumerIndexOfThis[e]=t.liveConsumerIndexOfThis[n],t.liveConsumerNode.length--,t.liveConsumerIndexOfThis.length--,e<t.liveConsumerNode.length){let r=t.liveConsumerIndexOfThis[e],i=t.liveConsumerNode[e];W(i),i.producerIndexOfThis[r]=e}}function Be(t){var e;return t.consumerIsAlwaysLive||(((e=t?.liveConsumerNode)==null?void 0:e.length)??0)>0}function W(t){t.producerNode??(t.producerNode=[]),t.producerIndexOfThis??(t.producerIndexOfThis=[]),t.producerLastReadVersion??(t.producerLastReadVersion=[])}function Ge(t){t.liveConsumerNode??(t.liveConsumerNode=[]),t.liveConsumerIndexOfThis??(t.liveConsumerIndexOfThis=[])}function Ct(t){if($t(t),ye(t),t.value===qe)throw t.error;return t.value}function Ns(t){let e=Object.create(Is);e.computation=t;let s=()=>Ct(e);return s[ve]=e,s}var je=Symbol("UNSET"),ze=Symbol("COMPUTING"),qe=Symbol("ERRORED"),Is={...Fe,value:je,dirty:!0,error:null,equal:_t,producerMustRecompute(t){return t.value===je||t.value===ze},producerRecomputeValue(t){if(t.value===ze)throw new Error("Detected cycle in computations.");let e=t.value;t.value=ze;let s=Ts(t),n,r=!1;try{n=t.computation.call(t.wrapper),r=e!==je&&e!==qe&&t.equal.call(t.wrapper,e,n)}catch(i){n=qe,t.error=i}finally{ks(t,s)}if(r){t.value=e;return}t.value=n,t.version++}};function Os(){throw new Error}var Ps=Os;function Hs(){Ps()}function Vs(t){let e=Object.create(Ds);e.value=t;let s=()=>(ye(e),e.value);return s[ve]=e,s}function Ms(){return ye(this),this.value}function Rs(t,e){Cs()||Hs(),t.equal.call(t.wrapper,t.value,e)||(t.value=e,Us(t))}var Ds={...Fe,equal:_t,value:void 0};function Us(t){t.version++,As(),St(t)}var x=Symbol("node"),_;(t=>{var e,s,n,r,i,o;class p{constructor(m,l={}){ge(this,s),Ue(this,e);let f=Vs(m)[ve];if(this[x]=f,f.wrapper=this,l){let $=l.equals;$&&(f.equal=$),f.watched=l[t.subtle.watched],f.unwatched=l[t.subtle.unwatched]}}get(){if(!(0,t.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.get");return Ms.call(this[x])}set(m){if(!(0,t.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.set");if(Ss())throw new Error("Writes to signals not permitted during Watcher callback");let l=this[x];Rs(l,m)}}e=x,s=new WeakSet,n=function(){},t.isState=u=>typeof u=="object"&&We(s,u),t.State=p;class d{constructor(m,l){ge(this,i),Ue(this,r);let f=Ns(m)[ve];if(f.consumerAllowSignalWrites=!0,this[x]=f,f.wrapper=this,l){let $=l.equals;$&&(f.equal=$),f.watched=l[t.subtle.watched],f.unwatched=l[t.subtle.unwatched]}}get(){if(!(0,t.isComputed)(this))throw new TypeError("Wrong receiver type for Signal.Computed.prototype.get");return Ct(this[x])}}r=x,i=new WeakSet,o=function(){},t.isComputed=u=>typeof u=="object"&&We(i,u),t.Computed=d,(u=>{var m,l,A,f,$;function Qt(v){let g,c=null;try{c=U(null),g=v()}finally{U(c)}return g}u.untrack=Qt;function es(v){var g;if(!(0,t.isComputed)(v)&&!(0,t.isWatcher)(v))throw new TypeError("Called introspectSources without a Computed or Watcher argument");return((g=v[x].producerNode)==null?void 0:g.map(c=>c.wrapper))??[]}u.introspectSources=es;function ts(v){var g;if(!(0,t.isComputed)(v)&&!(0,t.isState)(v))throw new TypeError("Called introspectSinks without a Signal argument");return((g=v[x].liveConsumerNode)==null?void 0:g.map(c=>c.wrapper))??[]}u.introspectSinks=ts;function ss(v){if(!(0,t.isComputed)(v)&&!(0,t.isState)(v))throw new TypeError("Called hasSinks without a Signal argument");let g=v[x].liveConsumerNode;return g?g.length>0:!1}u.hasSinks=ss;function ns(v){if(!(0,t.isComputed)(v)&&!(0,t.isWatcher)(v))throw new TypeError("Called hasSources without a Computed or Watcher argument");let g=v[x].producerNode;return g?g.length>0:!1}u.hasSources=ns;class rs{constructor(g){ge(this,l),ge(this,f),Ue(this,m);let c=Object.create(Fe);c.wrapper=this,c.consumerMarkedDirty=g,c.consumerIsAlwaysLive=!0,c.consumerAllowSignalWrites=!1,c.producerNode=[],this[x]=c}watch(...g){if(!(0,t.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");xt(this,f,$).call(this,g);let c=this[x];c.dirty=!1;let C=U(c);for(let he of g)ye(he[x]);U(C)}unwatch(...g){if(!(0,t.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");xt(this,f,$).call(this,g);let c=this[x];W(c);for(let C=c.producerNode.length-1;C>=0;C--)if(g.includes(c.producerNode[C].wrapper)){be(c.producerNode[C],c.producerIndexOfThis[C]);let he=c.producerNode.length-1;if(c.producerNode[C]=c.producerNode[he],c.producerIndexOfThis[C]=c.producerIndexOfThis[he],c.producerNode.length--,c.producerIndexOfThis.length--,c.nextProducerIndex--,C<c.producerNode.length){let os=c.producerIndexOfThis[C],ot=c.producerNode[C];Ge(ot),ot.liveConsumerIndexOfThis[os]=C}}}getPending(){if(!(0,t.isWatcher)(this))throw new TypeError("Called getPending without Watcher receiver");return this[x].producerNode.filter(c=>c.dirty).map(c=>c.wrapper)}}m=x,l=new WeakSet,A=function(){},f=new WeakSet,$=function(v){for(let g of v)if(!(0,t.isComputed)(g)&&!(0,t.isState)(g))throw new TypeError("Called watch/unwatch without a Computed or State argument")},t.isWatcher=v=>We(l,v),u.Watcher=rs;function is(){var v;return(v=$s())==null?void 0:v.wrapper}u.currentComputed=is,u.watched=Symbol("watched"),u.unwatched=Symbol("unwatched")})(t.subtle||(t.subtle={}))})(_||(_={}));var bn=Symbol("SignalWatcherBrand"),wn=new FinalizationRegistry((({watcher:t,signal:e})=>{t.unwatch(e)}));var we={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Z=t=>(...e)=>({_$litDirective$:t,values:e}),j=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,s,n){this._$Ct=e,this._$AM=s,this._$Ci=n}_$AS(e,s){return this.update(e,s)}update(e,s){return this.render(...s)}};var J=globalThis,xe=J.trustedTypes,Et=xe?xe.createPolicy("lit-html",{createHTML:t=>t}):void 0,Ke="$lit$",L=`lit$${Math.random().toFixed(9).slice(2)}$`,Je="?"+L,Ws=`<${Je}>`,M=document,Y=()=>M.createComment(""),X=t=>t===null||typeof t!="object"&&typeof t!="function",Ye=Array.isArray,Ot=t=>Ye(t)||typeof t?.[Symbol.iterator]=="function",Ze=`[
2
- \f\r]`,K=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Tt=/-->/g,kt=/>/g,H=RegExp(`>|${Ze}(?:([^\\s"'>=/]+)(${Ze}*=${Ze}*(?:[^
3
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Lt=/'/g,Nt=/"/g,Pt=/^(?:script|style|textarea|title)$/i,Xe=t=>(e,...s)=>({_$litType$:t,strings:e,values:s}),a=Xe(1),Ht=Xe(2),An=Xe(3),N=Symbol.for("lit-noChange"),b=Symbol.for("lit-nothing"),It=new WeakMap,V=M.createTreeWalker(M,129);function Vt(t,e){if(!Ye(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Et!==void 0?Et.createHTML(e):e}var Mt=(t,e)=>{let s=t.length-1,n=[],r,i=e===2?"<svg>":e===3?"<math>":"",o=K;for(let p=0;p<s;p++){let d=t[p],u,m,l=-1,A=0;for(;A<d.length&&(o.lastIndex=A,m=o.exec(d),m!==null);)A=o.lastIndex,o===K?m[1]==="!--"?o=Tt:m[1]!==void 0?o=kt:m[2]!==void 0?(Pt.test(m[2])&&(r=RegExp("</"+m[2],"g")),o=H):m[3]!==void 0&&(o=H):o===H?m[0]===">"?(o=r??K,l=-1):m[1]===void 0?l=-2:(l=o.lastIndex-m[2].length,u=m[1],o=m[3]===void 0?H:m[3]==='"'?Nt:Lt):o===Nt||o===Lt?o=H:o===Tt||o===kt?o=K:(o=H,r=void 0);let f=o===H&&t[p+1].startsWith("/>")?" ":"";i+=o===K?d+Ws:l>=0?(n.push(u),d.slice(0,l)+Ke+d.slice(l)+L+f):d+L+(l===-2?p:f)}return[Vt(t,i+(t[s]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]},Q=class t{constructor({strings:e,_$litType$:s},n){let r;this.parts=[];let i=0,o=0,p=e.length-1,d=this.parts,[u,m]=Mt(e,s);if(this.el=t.createElement(u,n),V.currentNode=this.el.content,s===2||s===3){let l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(r=V.nextNode())!==null&&d.length<p;){if(r.nodeType===1){if(r.hasAttributes())for(let l of r.getAttributeNames())if(l.endsWith(Ke)){let A=m[o++],f=r.getAttribute(l).split(L),$=/([.?@])?(.*)/.exec(A);d.push({type:1,index:i,name:$[2],strings:f,ctor:$[1]==="."?$e:$[1]==="?"?Se:$[1]==="@"?Ae:D}),r.removeAttribute(l)}else l.startsWith(L)&&(d.push({type:6,index:i}),r.removeAttribute(l));if(Pt.test(r.tagName)){let l=r.textContent.split(L),A=l.length-1;if(A>0){r.textContent=xe?xe.emptyScript:"";for(let f=0;f<A;f++)r.append(l[f],Y()),V.nextNode(),d.push({type:2,index:++i});r.append(l[A],Y())}}}else if(r.nodeType===8)if(r.data===Je)d.push({type:2,index:i});else{let l=-1;for(;(l=r.data.indexOf(L,l+1))!==-1;)d.push({type:7,index:i}),l+=L.length-1}i++}}static createElement(e,s){let n=M.createElement("template");return n.innerHTML=e,n}};function R(t,e,s=t,n){if(e===N)return e;let r=n!==void 0?s._$Co?.[n]:s._$Cl,i=X(e)?void 0:e._$litDirective$;return r?.constructor!==i&&(r?._$AO?.(!1),i===void 0?r=void 0:(r=new i(t),r._$AT(t,s,n)),n!==void 0?(s._$Co??(s._$Co=[]))[n]=r:s._$Cl=r),r!==void 0&&(e=R(t,r._$AS(t,e.values),r,n)),e}var _e=class{constructor(e,s){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=s}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:s},parts:n}=this._$AD,r=(e?.creationScope??M).importNode(s,!0);V.currentNode=r;let i=V.nextNode(),o=0,p=0,d=n[0];for(;d!==void 0;){if(o===d.index){let u;d.type===2?u=new z(i,i.nextSibling,this,e):d.type===1?u=new d.ctor(i,d.name,d.strings,this,e):d.type===6&&(u=new Ce(i,this,e)),this._$AV.push(u),d=n[++p]}o!==d?.index&&(i=V.nextNode(),o++)}return V.currentNode=M,r}p(e){let s=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,s),s+=n.strings.length-2):n._$AI(e[s])),s++}},z=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,s,n,r){this.type=2,this._$AH=b,this._$AN=void 0,this._$AA=e,this._$AB=s,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,s=this._$AM;return s!==void 0&&e?.nodeType===11&&(e=s.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,s=this){e=R(this,e,s),X(e)?e===b||e==null||e===""?(this._$AH!==b&&this._$AR(),this._$AH=b):e!==this._$AH&&e!==N&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Ot(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!==b&&X(this._$AH)?this._$AA.nextSibling.data=e:this.T(M.createTextNode(e)),this._$AH=e}$(e){let{values:s,_$litType$:n}=e,r=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=Q.createElement(Vt(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(s);else{let i=new _e(r,this),o=i.u(this.options);i.p(s),this.T(o),this._$AH=i}}_$AC(e){let s=It.get(e.strings);return s===void 0&&It.set(e.strings,s=new Q(e)),s}k(e){Ye(this._$AH)||(this._$AH=[],this._$AR());let s=this._$AH,n,r=0;for(let i of e)r===s.length?s.push(n=new t(this.O(Y()),this.O(Y()),this,this.options)):n=s[r],n._$AI(i),r++;r<s.length&&(this._$AR(n&&n._$AB.nextSibling,r),s.length=r)}_$AR(e=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);e!==this._$AB;){let n=e.nextSibling;e.remove(),e=n}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},D=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,s,n,r,i){this.type=1,this._$AH=b,this._$AN=void 0,this.element=e,this.name=s,this._$AM=r,this.options=i,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=b}_$AI(e,s=this,n,r){let i=this.strings,o=!1;if(i===void 0)e=R(this,e,s,0),o=!X(e)||e!==this._$AH&&e!==N,o&&(this._$AH=e);else{let p=e,d,u;for(e=i[0],d=0;d<i.length-1;d++)u=R(this,p[n+d],s,d),u===N&&(u=this._$AH[d]),o||(o=!X(u)||u!==this._$AH[d]),u===b?e=b:e!==b&&(e+=(u??"")+i[d+1]),this._$AH[d]=u}o&&!r&&this.j(e)}j(e){e===b?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},$e=class extends D{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===b?void 0:e}},Se=class extends D{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==b)}},Ae=class extends D{constructor(e,s,n,r,i){super(e,s,n,r,i),this.type=5}_$AI(e,s=this){if((e=R(this,e,s,0)??b)===N)return;let n=this._$AH,r=e===b&&n!==b||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,i=e!==b&&(n===b||r);r&&this.element.removeEventListener(this.name,this,n),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)}},Ce=class{constructor(e,s,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=s,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){R(this,e)}},Rt={M:Ke,P:L,A:Je,C:1,L:Mt,R:_e,D:Ot,V:R,I:z,H:D,N:Se,U:Ae,B:$e,F:Ce},js=J.litHtmlPolyfillSupport;js?.(Q,z),(J.litHtmlVersions??(J.litHtmlVersions=[])).push("3.3.1");var Dt=(t,e,s)=>{let n=s?.renderBefore??e,r=n._$litPart$;if(r===void 0){let i=s?.renderBefore??null;n._$litPart$=r=new z(e.insertBefore(Y(),i),i,void 0,s??{})}return r._$AI(t),r};var{I:Tn}=Rt;var Ut=t=>t.strings===void 0;var ee=(t,e)=>{let s=t._$AN;if(s===void 0)return!1;for(let n of s)n._$AO?.(e,!1),ee(n,e);return!0},Ee=t=>{let e,s;do{if((e=t._$AM)===void 0)break;s=e._$AN,s.delete(t),t=e}while(s?.size===0)},Wt=t=>{for(let e;e=t._$AM;t=e){let s=e._$AN;if(s===void 0)e._$AN=s=new Set;else if(s.has(t))break;s.add(t),qs(e)}};function zs(t){this._$AN!==void 0?(Ee(this),this._$AM=t,Wt(this)):this._$AM=t}function Bs(t,e=!1,s=0){let n=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(e)if(Array.isArray(n))for(let i=s;i<n.length;i++)ee(n[i],!1),Ee(n[i]);else n!=null&&(ee(n,!1),Ee(n));else ee(this,t)}var qs=t=>{t.type==we.CHILD&&(t._$AP??(t._$AP=Bs),t._$AQ??(t._$AQ=zs))},Te=class extends j{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,s,n){super._$AT(e,s,n),Wt(this),this.isConnected=e._$AU}_$AO(e,s=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),s&&(ee(this,e),Ee(this))}setValue(e){if(Ut(this._$Ct))this._$Ct._$AI(e,this);else{let s=[...this._$Ct._$AH];s[this._$Ci]=e,this._$Ct._$AI(s,this,0)}}disconnected(){}reconnected(){}};var ke=class extends Te{_$Sl(){if(this._$Su!==void 0)return;this._$SW=new _.Computed((()=>{var s;return(s=this._$Sj)===null||s===void 0?void 0:s.get()}));let e=this._$Su=new _.subtle.Watcher((()=>{var s;(s=this._$SO)===null||s===void 0||s._(this),e.watch()}));e.watch(this._$SW)}_$Sp(){var e;this._$Su!==void 0&&(this._$Su.unwatch(this._$SW),this._$SW=void 0,this._$Su=void 0,(e=this._$SO)===null||e===void 0||e.m(this))}commit(){this.setValue(_.subtle.untrack((()=>{var e;return(e=this._$SW)===null||e===void 0?void 0:e.get()})))}render(e){return _.subtle.untrack((()=>e.get()))}update(e,[s]){var n,r;return(n=this._$SO)!==null&&n!==void 0||(this._$SO=(r=e.options)===null||r===void 0?void 0:r.host),s!==this._$Sj&&this._$Sj!==void 0&&this._$Sp(),this._$Sj=s,this._$Sl(),_.subtle.untrack((()=>this._$SW.get()))}disconnected(){this._$Sp()}reconnected(){this._$Sl()}},Qe=Z(ke);var et=t=>(e,...s)=>t(e,...s.map((n=>n instanceof _.State||n instanceof _.Computed?Qe(n):n))),Fs=et(a),Gs=et(Ht);var Zn=_.State,Kn=_.Computed,jt=(t,e)=>new _.State(t,e);function Zs(){if(typeof window>"u")return"light";let t=window.localStorage?.getItem("ds-one:theme");return t==="light"||t==="dark"?t:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}var B=jt(Zs());function zt(t){if(t!==B.get()&&(B.set(t),typeof window<"u")){try{window.localStorage?.setItem("ds-one:theme",t)}catch(s){console.warn("ds-one: unable to persist theme preference",s)}let e=window.document?.documentElement;e&&(e.classList.remove("light-theme","dark-theme"),e.classList.add(`${t}-theme`)),window.dispatchEvent(new CustomEvent("theme-changed",{detail:{theme:t}}))}}if(typeof window<"u"){let t=B.get(),e=window.document?.documentElement;e&&(e.classList.remove("light-theme","dark-theme"),e.classList.add(`${t}-theme`))}var Le=globalThis,Ne=Le.ShadowRoot&&(Le.ShadyCSS===void 0||Le.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,tt=Symbol(),Bt=new WeakMap,te=class{constructor(e,s,n){if(this._$cssResult$=!0,n!==tt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=s}get styleSheet(){let e=this.o,s=this.t;if(Ne&&e===void 0){let n=s!==void 0&&s.length===1;n&&(e=Bt.get(s)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&Bt.set(s,e))}return e}toString(){return this.cssText}},qt=t=>new te(typeof t=="string"?t:t+"",void 0,tt),y=(t,...e)=>{let s=t.length===1?t[0]:e.reduce(((n,r,i)=>n+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+t[i+1]),t[0]);return new te(s,t,tt)},Ft=(t,e)=>{if(Ne)t.adoptedStyleSheets=e.map((s=>s instanceof CSSStyleSheet?s:s.styleSheet));else for(let s of e){let n=document.createElement("style"),r=Le.litNonce;r!==void 0&&n.setAttribute("nonce",r),n.textContent=s.cssText,t.appendChild(n)}},st=Ne?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let s="";for(let n of e.cssRules)s+=n.cssText;return qt(s)})(t):t;var{is:Ks,defineProperty:Js,getOwnPropertyDescriptor:Ys,getOwnPropertyNames:Xs,getOwnPropertySymbols:Qs,getPrototypeOf:en}=Object,O=globalThis,Gt=O.trustedTypes,tn=Gt?Gt.emptyScript:"",sn=O.reactiveElementPolyfillSupport,se=(t,e)=>t,nt={toAttribute(t,e){switch(e){case Boolean:t=t?tn:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=t!==null;break;case Number:s=t===null?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch{s=null}}return s}},Kt=(t,e)=>!Ks(t,e),Zt={attribute:!0,type:String,converter:nt,reflect:!1,useDefault:!1,hasChanged:Kt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),O.litPropertyMetadata??(O.litPropertyMetadata=new WeakMap);var I=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,s=Zt){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(e,s),!s.noAccessor){let n=Symbol(),r=this.getPropertyDescriptor(e,n,s);r!==void 0&&Js(this.prototype,e,r)}}static getPropertyDescriptor(e,s,n){let{get:r,set:i}=Ys(this.prototype,e)??{get(){return this[s]},set(o){this[s]=o}};return{get:r,set(o){let p=r?.call(this);i?.call(this,o),this.requestUpdate(e,p,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Zt}static _$Ei(){if(this.hasOwnProperty(se("elementProperties")))return;let e=en(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(se("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(se("properties"))){let s=this.properties,n=[...Xs(s),...Qs(s)];for(let r of n)this.createProperty(r,s[r])}let e=this[Symbol.metadata];if(e!==null){let s=litPropertyMetadata.get(e);if(s!==void 0)for(let[n,r]of s)this.elementProperties.set(n,r)}this._$Eh=new Map;for(let[s,n]of this.elementProperties){let r=this._$Eu(s,n);r!==void 0&&this._$Eh.set(r,s)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let s=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let r of n)s.unshift(st(r))}else e!==void 0&&s.push(st(e));return s}static _$Eu(e,s){let n=s.attribute;return n===!1?void 0:typeof n=="string"?n: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??(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,s=this.constructor.elementProperties;for(let n of s.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ft(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,s,n){this._$AK(e,n)}_$ET(e,s){let n=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,n);if(r!==void 0&&n.reflect===!0){let i=(n.converter?.toAttribute!==void 0?n.converter:nt).toAttribute(s,n.type);this._$Em=e,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(e,s){let n=this.constructor,r=n._$Eh.get(e);if(r!==void 0&&this._$Em!==r){let i=n.getPropertyOptions(r),o=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:nt;this._$Em=r;let p=o.fromAttribute(s,i.type);this[r]=p??this._$Ej?.get(r)??p,this._$Em=null}}requestUpdate(e,s,n){if(e!==void 0){let r=this.constructor,i=this[e];if(n??(n=r.getPropertyOptions(e)),!((n.hasChanged??Kt)(i,s)||n.useDefault&&n.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(r._$Eu(e,n))))return;this.C(e,s,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,s,{useDefault:n,reflect:r,wrapped:i},o){n&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,o??s??this[e]),i!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(s=void 0),this._$AL.set(e,s)),r===!0&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(s){Promise.reject(s)}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.renderRoot=this.createRenderRoot()),this._$Ep){for(let[r,i]of this._$Ep)this[r]=i;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[r,i]of n){let{wrapped:o}=i,p=this[r];o!==!0||this._$AL.has(r)||p===void 0||this.C(r,void 0,i,p)}}let e=!1,s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),this._$EO?.forEach((n=>n.hostUpdate?.())),this.update(s)):this._$EM()}catch(n){throw e=!1,this._$EM(),n}e&&this._$AE(s)}willUpdate(e){}_$AE(e){this._$EO?.forEach((s=>s.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=this._$Eq.forEach((s=>this._$ET(s,this[s])))),this._$EM()}updated(e){}firstUpdated(e){}};I.elementStyles=[],I.shadowRootOptions={mode:"open"},I[se("elementProperties")]=new Map,I[se("finalized")]=new Map,sn?.({ReactiveElement:I}),(O.reactiveElementVersions??(O.reactiveElementVersions=[])).push("2.1.1");var ne=globalThis,h=class extends I{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var s;let e=super.createRenderRoot();return(s=this.renderOptions).renderBefore??(s.renderBefore=e.firstChild),e}update(e){let s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Dt(s,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return N}};h._$litElement$=!0,h.finalized=!0,ne.litElementHydrateSupport?.({LitElement:h});var nn=ne.litElementPolyfillSupport;nn?.({LitElement:h});(ne.litElementVersions??(ne.litElementVersions=[])).push("4.2.1");var re=class extends h{constructor(){super(),this._handleLanguageChange=()=>{this._updateText()},this.variant="title",this.disabled=!1,this.bold=!1,this["no-background"]=!1,this.blank=!1,this.notionKey=null,this.key="",this.fallback="",this.language="en-US",this.defaultText="",this.href="",this._loading=!1,this._notionText=null}connectedCallback(){super.connectedCallback(),this._updateText(),window.addEventListener("language-changed",this._handleLanguageChange)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("language-changed",this._handleLanguageChange)}updated(e){super.updated(e),(e.has("key")||e.has("defaultText"))&&this._updateText()}_updateText(){this.key?this._notionText=fe(this.key):this._notionText=this.defaultText||this.fallback||null,this.requestUpdate()}render(){return a`
1
+ function is(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigator,e=window,s=t&&(t.userAgent||t.vendor)||e&&e.opera||"",r=/Mobile|Android|iP(ad|hone|od)|IEMobile|BlackBerry|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)|Windows Phone|Phone|Tablet/i.test(s),i=(t&&t.maxTouchPoints||0)>1,o=e?Math.min(e.innerWidth||0,e.innerHeight||0)<=820:!1;return r||i&&o}function os(){let t=is(),e=navigator,s=window,n=(e&&e.maxTouchPoints||0)>1,i=typeof document<"u"?document.documentElement.clientWidth:s?.innerWidth||0,o=typeof document<"u"?document.documentElement.clientHeight:s?.innerHeight||0,p=t&&Math.min(i,o)>=600;return{isMobile:t,isTablet:p,isDesktop:!t,isTouchCapable:n,deviceType:t?p?"tablet":"mobile":"desktop",userAgent:e&&(e.userAgent||e.vendor)||"",screenWidth:i,screenHeight:o}}function Ve(){let t=os();if(t.isMobile&&typeof document<"u"){let r=t.screenWidth/280;document.documentElement.style.setProperty("--sf",r.toFixed(3)),document.documentElement.style.setProperty("--sf",r.toFixed(3)),console.log(`[DS one] Mobile device detected - ${t.deviceType} (${t.screenWidth}x${t.screenHeight}), scaling factor: ${r.toFixed(2)}`)}else typeof document<"u"&&(document.documentElement.style.setProperty("--sf","1"),document.documentElement.style.setProperty("--sf","1")),console.log(`[DS one] Desktop device detected (${t.screenWidth}x${t.screenHeight})`);return typeof window<"u"&&window.DS_ONE_DEBUG&&console.log("[DS one] Device Info:",{type:t.deviceType,isMobile:t.isMobile,isTablet:t.isTablet,isDesktop:t.isDesktop,isTouchCapable:t.isTouchCapable,viewport:`${t.screenWidth}x${t.screenHeight}`,userAgent:t.userAgent}),t}if(typeof window<"u"){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{Ve()}):Ve();let t;window.addEventListener("resize",()=>{clearTimeout(t),t=setTimeout(()=>{Ve()},100)})}var as={},gt=["da","de","en","es","fr","it","ja","pt","sv","zh"],ls=new Map(gt.map((t,e)=>[t,e])),ot={da:"Danish","da-dk":"Danish",de:"German","de-de":"German",en:"English","en-us":"English",es:"Spanish","es-es":"Spanish",fr:"French","fr-fr":"French",it:"Italian","it-it":"Italian",ja:"Japanese","ja-jp":"Japanese",pt:"Portuguese","pt-pt":"Portuguese",sv:"Swedish","sv-se":"Swedish",zh:"Chinese","zh-cn":"Chinese","zh-tw":"Chinese","zh-hans":"Chinese","zh-hant":"Chinese"},at=new Map,lt=!1,mt="./translations.json",ct=!1;function dt(t){if(!t)return null;let e=t.trim();return e?e.startsWith("./")||e.startsWith("../")||e.startsWith("/")||/^https?:\/\//i.test(e)?e:`./${e}`:null}function cs(){if(typeof document>"u")return null;let e=document.querySelector("script[data-ds-one-translations]")?.getAttribute("data-ds-one-translations");if(e)return e;let s=document.querySelector('meta[name="ds-one:translations"]')?.getAttribute("content");if(s)return s;let r=document.querySelector('link[rel="ds-one-translations"]')?.getAttribute("href");return r||null}function ds(){let t=[],e=typeof window<"u"?window.DS_ONE_TRANSLATIONS_FILE:null,s=cs(),r=dt(e??"");r&&t.push(r);let n=dt(s??"");return n&&!t.includes(n)&&t.push(n),t.length===0&&t.push(mt),t}function us(t){return!t||typeof t!="object"?!1:Object.values(t).every(e=>e&&typeof e=="object")}async function hs(t){try{let e=await fetch(t);if(!e.ok)return null;let s=await e.json();return us(s)?Object.keys(s).length===0?(console.warn(`[DS one] No languages found in ${t}`),null):s:(console.warn(`[DS one] Invalid translation format in ${t}. Expected object with language codes as keys.`),null)}catch{return null}}async function ut(){if(ct||(ct=!0,typeof window>"u"))return!1;if(window.DS_ONE_TRANSLATIONS&&Object.keys(window.DS_ONE_TRANSLATIONS).length>0)return console.log(`[DS one] Translations already loaded (${Object.keys(window.DS_ONE_TRANSLATIONS).length} languages), skipping auto-load`),!0;let t=ds();for(let e of t){let s=await hs(e);if(!s)continue;window.DS_ONE_TRANSLATIONS=s;let r=Object.keys(s);return console.log(`[DS one] External translations loaded from ${e}: ${r.length} language(s) \u2013 ${r.join(", ")}`),window.dispatchEvent(new CustomEvent("translations-ready")),!0}return console.info(`[DS one] No external translations found at ${t[0]??mt}. Using bundled translations.`),!1}function pe(){return typeof window<"u"&&window.DS_ONE_TRANSLATIONS?window.DS_ONE_TRANSLATIONS:as}var I=pe(),E="en";function F(t){return t?t.toLowerCase().split(/[-_]/)[0]??"":""}function ht(t){let e=F(t),s=ls.get(e);return typeof s=="number"?s:gt.length}function vt(t){return[...t].sort((e,s)=>{let r=ht(e),n=ht(s);return r!==n?r-n:e.localeCompare(s)})}function ps(t,e){let s=t?.replace("_","-");if(s)try{let r=at.get(s);r||(r=new Intl.DisplayNames([s],{type:"language"}),at.set(s,r));let n=e.replace("_","-"),i=r.of(n);if(i&&i!==n)return i;let o=r.of(F(n));if(o)return o}catch{lt||(console.info("[DS one] Intl.DisplayNames is not available, using fallback language names."),lt=!0)}}function fs(t){let e=t.toLowerCase().replace("_","-"),s=ot[e];if(s)return s;let r=F(e);return ot[r]}function yt(t,e={}){if(!t)return"";let s=[];e.locale&&s.push(e.locale),typeof navigator<"u"&&(Array.isArray(navigator.languages)&&s.push(...navigator.languages),navigator.language&&s.push(navigator.language)),s.push(E),s.push("en");let r=new Set;for(let o of s){if(!o||r.has(o))continue;r.add(o);let p=ps(o,t);if(p)return p}let n=fs(t);if(n)return n;let i=F(t);return i?i.toUpperCase():t}var pt={da:"da","da-dk":"da",de:"de","de-de":"de",en:"en","en-us":"en","en-gb":"en",es:"es","es-es":"es","es-mx":"es",fr:"fr","fr-fr":"fr",it:"it","it-it":"it",ja:"ja","ja-jp":"ja",pt:"pt","pt-pt":"pt","pt-br":"pt",sv:"sv","sv-se":"sv",zh:"zh","zh-cn":"zh","zh-hans":"zh","zh-tw":"zh","zh-hant":"zh"};function ft(t){if(!t)return null;let e=t.toLowerCase().replace("_","-"),s=pt[e];if(s)return s;let r=F(e),n=pt[r];return n||t}function gs(){if(typeof navigator>"u")return E;let t=navigator.language;if(t){let e=ft(t);if(e)return e}if(Array.isArray(navigator.languages))for(let e of navigator.languages){let s=ft(e);if(s)return s}return E}var nr=typeof window<"u"?window.localStorage?.getItem("ds-one:language")??void 0:void 0,T={value:localStorage.getItem("language")||gs(),set:function(t){this.value=t,localStorage.setItem("language",t),window.dispatchEvent(new CustomEvent("language-changed",{detail:{language:t},bubbles:!0,composed:!0}))}};typeof window<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{ut()}):ut());typeof window<"u"&&window.addEventListener("translations-ready",()=>{I=pe(),window.dispatchEvent(new CustomEvent("translations-loaded"));let t=T.value;window.dispatchEvent(new CustomEvent("language-changed",{detail:{language:t},bubbles:!0,composed:!0}))});setTimeout(()=>{window.dispatchEvent(new CustomEvent("translations-loaded"));let t=T.value;window.dispatchEvent(new CustomEvent("language-changed",{detail:{language:t},bubbles:!0,composed:!0}))},100);function C(t){let e=T.value;return I?.[e]?.[t]?I[e][t]:e!==E&&I?.[E]?.[t]?I[E][t]:(console.warn(`[DS one (Internationalization)] No translation found for key "${t}"`),t)}function ir(t,e=T.value){if(!t)return!1;let s=I?.[e];return!!(s&&Object.prototype.hasOwnProperty.call(s,t)||e!==E&&I?.[E]&&Object.prototype.hasOwnProperty.call(I[E],t))}function fe(t){return C(t)}function or(){let t=pe();if(t&&Object.keys(t).length>0){let e=Object.keys(t);return Promise.resolve(vt(e))}return Promise.resolve([E])}function Me(){let t=pe();return t&&Object.keys(t).length>0?vt(Object.keys(t)):[E]}function ar(t,e){console.log(`Loading additional translations for ${t}:`,Object.keys(e).length,"keys")}function Re(t){localStorage.setItem("language",t),T.set(t),window.dispatchEvent(new CustomEvent("language-changed",{detail:{language:t},bubbles:!0,composed:!0}))}function P(t){if(!(typeof window>"u"))try{let e=window.localStorage?.getItem("ds-one:preferences"),r={...e?JSON.parse(e):{},...t};window.localStorage?.setItem("ds-one:preferences",JSON.stringify(r))}catch(e){console.warn("ds-one: unable to persist preferences",e)}}var ms={da:"kr.",nb:"kr.",sv:"kr.",de:"\u20AC",en:"$",pt:"\u20AC",es:"\u20AC",zh:"\xA5",ja:"\xA5",ko:"\u20A9"};function dr(t){let{language:e,country:s}=t;if(s){let n=s.toUpperCase();if(n==="US"||n==="USA")return"$";if(n==="GB"||n==="UK")return"\xA3";if(n==="JP"||n==="JPN"||n==="CN"||n==="CHN")return"\xA5";if(n==="KR"||n==="KOR")return"\u20A9"}let r=e.toLowerCase().split(/[-_]/)[0];return ms[r]||"$"}var vs=Object.defineProperty,ys=(t,e,s)=>e in t?vs(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,De=(t,e,s)=>(ys(t,typeof e!="symbol"?e+"":e,s),s),bs=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)},Ue=(t,e)=>{if(Object(e)!==e)throw TypeError('Cannot use the "in" operator on this value');return t.has(e)},ge=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},bt=(t,e,s)=>(bs(t,e,"access private method"),s);function wt(t,e){return Object.is(t,e)}var w=null,G=!1,me=1,ve=Symbol("SIGNAL");function U(t){let e=w;return w=t,e}function ws(){return w}function xs(){return G}var qe={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function ye(t){if(G)throw new Error(typeof ngDevMode<"u"&&ngDevMode?"Assertion error: signal read during notification phase":"");if(w===null)return;w.consumerOnSignalRead(t);let e=w.nextProducerIndex++;if(W(w),e<w.producerNode.length&&w.producerNode[e]!==t&&ze(w)){let s=w.producerNode[e];be(s,w.producerIndexOfThis[e])}w.producerNode[e]!==t&&(w.producerNode[e]=t,w.producerIndexOfThis[e]=ze(w)?$t(t,w,e):0),w.producerLastReadVersion[e]=t.version}function _s(){me++}function xt(t){if(!(!t.dirty&&t.lastCleanEpoch===me)){if(!t.producerMustRecompute(t)&&!Es(t)){t.dirty=!1,t.lastCleanEpoch=me;return}t.producerRecomputeValue(t),t.dirty=!1,t.lastCleanEpoch=me}}function _t(t){if(t.liveConsumerNode===void 0)return;let e=G;G=!0;try{for(let s of t.liveConsumerNode)s.dirty||Ss(s)}finally{G=e}}function $s(){return w?.consumerAllowSignalWrites!==!1}function Ss(t){var e;t.dirty=!0,_t(t),(e=t.consumerMarkedDirty)==null||e.call(t.wrapper??t)}function As(t){return t&&(t.nextProducerIndex=0),U(t)}function Cs(t,e){if(U(e),!(!t||t.producerNode===void 0||t.producerIndexOfThis===void 0||t.producerLastReadVersion===void 0)){if(ze(t))for(let s=t.nextProducerIndex;s<t.producerNode.length;s++)be(t.producerNode[s],t.producerIndexOfThis[s]);for(;t.producerNode.length>t.nextProducerIndex;)t.producerNode.pop(),t.producerLastReadVersion.pop(),t.producerIndexOfThis.pop()}}function Es(t){W(t);for(let e=0;e<t.producerNode.length;e++){let s=t.producerNode[e],r=t.producerLastReadVersion[e];if(r!==s.version||(xt(s),r!==s.version))return!0}return!1}function $t(t,e,s){var r;if(Fe(t),W(t),t.liveConsumerNode.length===0){(r=t.watched)==null||r.call(t.wrapper);for(let n=0;n<t.producerNode.length;n++)t.producerIndexOfThis[n]=$t(t.producerNode[n],t,n)}return t.liveConsumerIndexOfThis.push(s),t.liveConsumerNode.push(e)-1}function be(t,e){var s;if(Fe(t),W(t),typeof ngDevMode<"u"&&ngDevMode&&e>=t.liveConsumerNode.length)throw new Error(`Assertion error: active consumer index ${e} is out of bounds of ${t.liveConsumerNode.length} consumers)`);if(t.liveConsumerNode.length===1){(s=t.unwatched)==null||s.call(t.wrapper);for(let n=0;n<t.producerNode.length;n++)be(t.producerNode[n],t.producerIndexOfThis[n])}let r=t.liveConsumerNode.length-1;if(t.liveConsumerNode[e]=t.liveConsumerNode[r],t.liveConsumerIndexOfThis[e]=t.liveConsumerIndexOfThis[r],t.liveConsumerNode.length--,t.liveConsumerIndexOfThis.length--,e<t.liveConsumerNode.length){let n=t.liveConsumerIndexOfThis[e],i=t.liveConsumerNode[e];W(i),i.producerIndexOfThis[n]=e}}function ze(t){var e;return t.consumerIsAlwaysLive||(((e=t?.liveConsumerNode)==null?void 0:e.length)??0)>0}function W(t){t.producerNode??(t.producerNode=[]),t.producerIndexOfThis??(t.producerIndexOfThis=[]),t.producerLastReadVersion??(t.producerLastReadVersion=[])}function Fe(t){t.liveConsumerNode??(t.liveConsumerNode=[]),t.liveConsumerIndexOfThis??(t.liveConsumerIndexOfThis=[])}function St(t){if(xt(t),ye(t),t.value===Be)throw t.error;return t.value}function Ts(t){let e=Object.create(ks);e.computation=t;let s=()=>St(e);return s[ve]=e,s}var We=Symbol("UNSET"),je=Symbol("COMPUTING"),Be=Symbol("ERRORED"),ks={...qe,value:We,dirty:!0,error:null,equal:wt,producerMustRecompute(t){return t.value===We||t.value===je},producerRecomputeValue(t){if(t.value===je)throw new Error("Detected cycle in computations.");let e=t.value;t.value=je;let s=As(t),r,n=!1;try{r=t.computation.call(t.wrapper),n=e!==We&&e!==Be&&t.equal.call(t.wrapper,e,r)}catch(i){r=Be,t.error=i}finally{Cs(t,s)}if(n){t.value=e;return}t.value=r,t.version++}};function Ls(){throw new Error}var Ns=Ls;function Is(){Ns()}function Os(t){let e=Object.create(Vs);e.value=t;let s=()=>(ye(e),e.value);return s[ve]=e,s}function Ps(){return ye(this),this.value}function Hs(t,e){$s()||Is(),t.equal.call(t.wrapper,t.value,e)||(t.value=e,Ms(t))}var Vs={...qe,equal:wt,value:void 0};function Ms(t){t.version++,_s(),_t(t)}var x=Symbol("node"),_;(t=>{var e,s,r,n,i,o;class p{constructor(m,l={}){ge(this,s),De(this,e);let f=Os(m)[ve];if(this[x]=f,f.wrapper=this,l){let $=l.equals;$&&(f.equal=$),f.watched=l[t.subtle.watched],f.unwatched=l[t.subtle.unwatched]}}get(){if(!(0,t.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.get");return Ps.call(this[x])}set(m){if(!(0,t.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.set");if(xs())throw new Error("Writes to signals not permitted during Watcher callback");let l=this[x];Hs(l,m)}}e=x,s=new WeakSet,r=function(){},t.isState=u=>typeof u=="object"&&Ue(s,u),t.State=p;class d{constructor(m,l){ge(this,i),De(this,n);let f=Ts(m)[ve];if(f.consumerAllowSignalWrites=!0,this[x]=f,f.wrapper=this,l){let $=l.equals;$&&(f.equal=$),f.watched=l[t.subtle.watched],f.unwatched=l[t.subtle.unwatched]}}get(){if(!(0,t.isComputed)(this))throw new TypeError("Wrong receiver type for Signal.Computed.prototype.get");return St(this[x])}}n=x,i=new WeakSet,o=function(){},t.isComputed=u=>typeof u=="object"&&Ue(i,u),t.Computed=d,(u=>{var m,l,S,f,$;function Yt(v){let g,c=null;try{c=U(null),g=v()}finally{U(c)}return g}u.untrack=Yt;function Xt(v){var g;if(!(0,t.isComputed)(v)&&!(0,t.isWatcher)(v))throw new TypeError("Called introspectSources without a Computed or Watcher argument");return((g=v[x].producerNode)==null?void 0:g.map(c=>c.wrapper))??[]}u.introspectSources=Xt;function Qt(v){var g;if(!(0,t.isComputed)(v)&&!(0,t.isState)(v))throw new TypeError("Called introspectSinks without a Signal argument");return((g=v[x].liveConsumerNode)==null?void 0:g.map(c=>c.wrapper))??[]}u.introspectSinks=Qt;function es(v){if(!(0,t.isComputed)(v)&&!(0,t.isState)(v))throw new TypeError("Called hasSinks without a Signal argument");let g=v[x].liveConsumerNode;return g?g.length>0:!1}u.hasSinks=es;function ts(v){if(!(0,t.isComputed)(v)&&!(0,t.isWatcher)(v))throw new TypeError("Called hasSources without a Computed or Watcher argument");let g=v[x].producerNode;return g?g.length>0:!1}u.hasSources=ts;class ss{constructor(g){ge(this,l),ge(this,f),De(this,m);let c=Object.create(qe);c.wrapper=this,c.consumerMarkedDirty=g,c.consumerIsAlwaysLive=!0,c.consumerAllowSignalWrites=!1,c.producerNode=[],this[x]=c}watch(...g){if(!(0,t.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");bt(this,f,$).call(this,g);let c=this[x];c.dirty=!1;let A=U(c);for(let he of g)ye(he[x]);U(A)}unwatch(...g){if(!(0,t.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");bt(this,f,$).call(this,g);let c=this[x];W(c);for(let A=c.producerNode.length-1;A>=0;A--)if(g.includes(c.producerNode[A].wrapper)){be(c.producerNode[A],c.producerIndexOfThis[A]);let he=c.producerNode.length-1;if(c.producerNode[A]=c.producerNode[he],c.producerIndexOfThis[A]=c.producerIndexOfThis[he],c.producerNode.length--,c.producerIndexOfThis.length--,c.nextProducerIndex--,A<c.producerNode.length){let ns=c.producerIndexOfThis[A],it=c.producerNode[A];Fe(it),it.liveConsumerIndexOfThis[ns]=A}}}getPending(){if(!(0,t.isWatcher)(this))throw new TypeError("Called getPending without Watcher receiver");return this[x].producerNode.filter(c=>c.dirty).map(c=>c.wrapper)}}m=x,l=new WeakSet,S=function(){},f=new WeakSet,$=function(v){for(let g of v)if(!(0,t.isComputed)(g)&&!(0,t.isState)(g))throw new TypeError("Called watch/unwatch without a Computed or State argument")},t.isWatcher=v=>Ue(l,v),u.Watcher=ss;function rs(){var v;return(v=ws())==null?void 0:v.wrapper}u.currentComputed=rs,u.watched=Symbol("watched"),u.unwatched=Symbol("unwatched")})(t.subtle||(t.subtle={}))})(_||(_={}));var fr=Symbol("SignalWatcherBrand"),gr=new FinalizationRegistry((({watcher:t,signal:e})=>{t.unwatch(e)}));var we={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Z=t=>(...e)=>({_$litDirective$:t,values:e}),j=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,s,r){this._$Ct=e,this._$AM=s,this._$Ci=r}_$AS(e,s){return this.update(e,s)}update(e,s){return this.render(...s)}};var J=globalThis,xe=J.trustedTypes,At=xe?xe.createPolicy("lit-html",{createHTML:t=>t}):void 0,Ze="$lit$",k=`lit$${Math.random().toFixed(9).slice(2)}$`,Ke="?"+k,Rs=`<${Ke}>`,M=document,Y=()=>M.createComment(""),X=t=>t===null||typeof t!="object"&&typeof t!="function",Je=Array.isArray,Nt=t=>Je(t)||typeof t?.[Symbol.iterator]=="function",Ge=`[
2
+ \f\r]`,K=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ct=/-->/g,Et=/>/g,H=RegExp(`>|${Ge}(?:([^\\s"'>=/]+)(${Ge}*=${Ge}*(?:[^
3
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Tt=/'/g,kt=/"/g,It=/^(?:script|style|textarea|title)$/i,Ye=t=>(e,...s)=>({_$litType$:t,strings:e,values:s}),a=Ye(1),Ot=Ye(2),wr=Ye(3),L=Symbol.for("lit-noChange"),b=Symbol.for("lit-nothing"),Lt=new WeakMap,V=M.createTreeWalker(M,129);function Pt(t,e){if(!Je(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return At!==void 0?At.createHTML(e):e}var Ht=(t,e)=>{let s=t.length-1,r=[],n,i=e===2?"<svg>":e===3?"<math>":"",o=K;for(let p=0;p<s;p++){let d=t[p],u,m,l=-1,S=0;for(;S<d.length&&(o.lastIndex=S,m=o.exec(d),m!==null);)S=o.lastIndex,o===K?m[1]==="!--"?o=Ct:m[1]!==void 0?o=Et:m[2]!==void 0?(It.test(m[2])&&(n=RegExp("</"+m[2],"g")),o=H):m[3]!==void 0&&(o=H):o===H?m[0]===">"?(o=n??K,l=-1):m[1]===void 0?l=-2:(l=o.lastIndex-m[2].length,u=m[1],o=m[3]===void 0?H:m[3]==='"'?kt:Tt):o===kt||o===Tt?o=H:o===Ct||o===Et?o=K:(o=H,n=void 0);let f=o===H&&t[p+1].startsWith("/>")?" ":"";i+=o===K?d+Rs:l>=0?(r.push(u),d.slice(0,l)+Ze+d.slice(l)+k+f):d+k+(l===-2?p:f)}return[Pt(t,i+(t[s]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]},Q=class t{constructor({strings:e,_$litType$:s},r){let n;this.parts=[];let i=0,o=0,p=e.length-1,d=this.parts,[u,m]=Ht(e,s);if(this.el=t.createElement(u,r),V.currentNode=this.el.content,s===2||s===3){let l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(n=V.nextNode())!==null&&d.length<p;){if(n.nodeType===1){if(n.hasAttributes())for(let l of n.getAttributeNames())if(l.endsWith(Ze)){let S=m[o++],f=n.getAttribute(l).split(k),$=/([.?@])?(.*)/.exec(S);d.push({type:1,index:i,name:$[2],strings:f,ctor:$[1]==="."?$e:$[1]==="?"?Se:$[1]==="@"?Ae:D}),n.removeAttribute(l)}else l.startsWith(k)&&(d.push({type:6,index:i}),n.removeAttribute(l));if(It.test(n.tagName)){let l=n.textContent.split(k),S=l.length-1;if(S>0){n.textContent=xe?xe.emptyScript:"";for(let f=0;f<S;f++)n.append(l[f],Y()),V.nextNode(),d.push({type:2,index:++i});n.append(l[S],Y())}}}else if(n.nodeType===8)if(n.data===Ke)d.push({type:2,index:i});else{let l=-1;for(;(l=n.data.indexOf(k,l+1))!==-1;)d.push({type:7,index:i}),l+=k.length-1}i++}}static createElement(e,s){let r=M.createElement("template");return r.innerHTML=e,r}};function R(t,e,s=t,r){if(e===L)return e;let n=r!==void 0?s._$Co?.[r]:s._$Cl,i=X(e)?void 0:e._$litDirective$;return n?.constructor!==i&&(n?._$AO?.(!1),i===void 0?n=void 0:(n=new i(t),n._$AT(t,s,r)),r!==void 0?(s._$Co??(s._$Co=[]))[r]=n:s._$Cl=n),n!==void 0&&(e=R(t,n._$AS(t,e.values),n,r)),e}var _e=class{constructor(e,s){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=s}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:s},parts:r}=this._$AD,n=(e?.creationScope??M).importNode(s,!0);V.currentNode=n;let i=V.nextNode(),o=0,p=0,d=r[0];for(;d!==void 0;){if(o===d.index){let u;d.type===2?u=new z(i,i.nextSibling,this,e):d.type===1?u=new d.ctor(i,d.name,d.strings,this,e):d.type===6&&(u=new Ce(i,this,e)),this._$AV.push(u),d=r[++p]}o!==d?.index&&(i=V.nextNode(),o++)}return V.currentNode=M,n}p(e){let s=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,s),s+=r.strings.length-2):r._$AI(e[s])),s++}},z=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,s,r,n){this.type=2,this._$AH=b,this._$AN=void 0,this._$AA=e,this._$AB=s,this._$AM=r,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,s=this._$AM;return s!==void 0&&e?.nodeType===11&&(e=s.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,s=this){e=R(this,e,s),X(e)?e===b||e==null||e===""?(this._$AH!==b&&this._$AR(),this._$AH=b):e!==this._$AH&&e!==L&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Nt(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!==b&&X(this._$AH)?this._$AA.nextSibling.data=e:this.T(M.createTextNode(e)),this._$AH=e}$(e){let{values:s,_$litType$:r}=e,n=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=Q.createElement(Pt(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(s);else{let i=new _e(n,this),o=i.u(this.options);i.p(s),this.T(o),this._$AH=i}}_$AC(e){let s=Lt.get(e.strings);return s===void 0&&Lt.set(e.strings,s=new Q(e)),s}k(e){Je(this._$AH)||(this._$AH=[],this._$AR());let s=this._$AH,r,n=0;for(let i of e)n===s.length?s.push(r=new t(this.O(Y()),this.O(Y()),this,this.options)):r=s[n],r._$AI(i),n++;n<s.length&&(this._$AR(r&&r._$AB.nextSibling,n),s.length=n)}_$AR(e=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);e!==this._$AB;){let r=e.nextSibling;e.remove(),e=r}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},D=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,s,r,n,i){this.type=1,this._$AH=b,this._$AN=void 0,this.element=e,this.name=s,this._$AM=n,this.options=i,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=b}_$AI(e,s=this,r,n){let i=this.strings,o=!1;if(i===void 0)e=R(this,e,s,0),o=!X(e)||e!==this._$AH&&e!==L,o&&(this._$AH=e);else{let p=e,d,u;for(e=i[0],d=0;d<i.length-1;d++)u=R(this,p[r+d],s,d),u===L&&(u=this._$AH[d]),o||(o=!X(u)||u!==this._$AH[d]),u===b?e=b:e!==b&&(e+=(u??"")+i[d+1]),this._$AH[d]=u}o&&!n&&this.j(e)}j(e){e===b?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},$e=class extends D{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===b?void 0:e}},Se=class extends D{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==b)}},Ae=class extends D{constructor(e,s,r,n,i){super(e,s,r,n,i),this.type=5}_$AI(e,s=this){if((e=R(this,e,s,0)??b)===L)return;let r=this._$AH,n=e===b&&r!==b||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,i=e!==b&&(r===b||n);n&&this.element.removeEventListener(this.name,this,r),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)}},Ce=class{constructor(e,s,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=s,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){R(this,e)}},Vt={M:Ze,P:k,A:Ke,C:1,L:Ht,R:_e,D:Nt,V:R,I:z,H:D,N:Se,U:Ae,B:$e,F:Ce},Ds=J.litHtmlPolyfillSupport;Ds?.(Q,z),(J.litHtmlVersions??(J.litHtmlVersions=[])).push("3.3.1");var Mt=(t,e,s)=>{let r=s?.renderBefore??e,n=r._$litPart$;if(n===void 0){let i=s?.renderBefore??null;r._$litPart$=n=new z(e.insertBefore(Y(),i),i,void 0,s??{})}return n._$AI(t),n};var{I:$r}=Vt;var Rt=t=>t.strings===void 0;var ee=(t,e)=>{let s=t._$AN;if(s===void 0)return!1;for(let r of s)r._$AO?.(e,!1),ee(r,e);return!0},Ee=t=>{let e,s;do{if((e=t._$AM)===void 0)break;s=e._$AN,s.delete(t),t=e}while(s?.size===0)},Dt=t=>{for(let e;e=t._$AM;t=e){let s=e._$AN;if(s===void 0)e._$AN=s=new Set;else if(s.has(t))break;s.add(t),js(e)}};function Us(t){this._$AN!==void 0?(Ee(this),this._$AM=t,Dt(this)):this._$AM=t}function Ws(t,e=!1,s=0){let r=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(e)if(Array.isArray(r))for(let i=s;i<r.length;i++)ee(r[i],!1),Ee(r[i]);else r!=null&&(ee(r,!1),Ee(r));else ee(this,t)}var js=t=>{t.type==we.CHILD&&(t._$AP??(t._$AP=Ws),t._$AQ??(t._$AQ=Us))},Te=class extends j{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,s,r){super._$AT(e,s,r),Dt(this),this.isConnected=e._$AU}_$AO(e,s=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),s&&(ee(this,e),Ee(this))}setValue(e){if(Rt(this._$Ct))this._$Ct._$AI(e,this);else{let s=[...this._$Ct._$AH];s[this._$Ci]=e,this._$Ct._$AI(s,this,0)}}disconnected(){}reconnected(){}};var ke=class extends Te{_$Sl(){if(this._$Su!==void 0)return;this._$SW=new _.Computed((()=>{var s;return(s=this._$Sj)===null||s===void 0?void 0:s.get()}));let e=this._$Su=new _.subtle.Watcher((()=>{var s;(s=this._$SO)===null||s===void 0||s._(this),e.watch()}));e.watch(this._$SW)}_$Sp(){var e;this._$Su!==void 0&&(this._$Su.unwatch(this._$SW),this._$SW=void 0,this._$Su=void 0,(e=this._$SO)===null||e===void 0||e.m(this))}commit(){this.setValue(_.subtle.untrack((()=>{var e;return(e=this._$SW)===null||e===void 0?void 0:e.get()})))}render(e){return _.subtle.untrack((()=>e.get()))}update(e,[s]){var r,n;return(r=this._$SO)!==null&&r!==void 0||(this._$SO=(n=e.options)===null||n===void 0?void 0:n.host),s!==this._$Sj&&this._$Sj!==void 0&&this._$Sp(),this._$Sj=s,this._$Sl(),_.subtle.untrack((()=>this._$SW.get()))}disconnected(){this._$Sp()}reconnected(){this._$Sl()}},Xe=Z(ke);var Qe=t=>(e,...s)=>t(e,...s.map((r=>r instanceof _.State||r instanceof _.Computed?Xe(r):r))),zs=Qe(a),Bs=Qe(Ot);var zr=_.State,Br=_.Computed,Ut=(t,e)=>new _.State(t,e);function qs(){if(typeof window>"u")return"light";let t=window.localStorage?.getItem("ds-one:theme");return t==="light"||t==="dark"?t:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}var B=Ut(qs());function Wt(t){if(t!==B.get()&&(B.set(t),typeof window<"u")){try{window.localStorage?.setItem("ds-one:theme",t)}catch(s){console.warn("ds-one: unable to persist theme preference",s)}let e=window.document?.documentElement;e&&(e.classList.remove("light-theme","dark-theme"),e.classList.add(`${t}-theme`)),window.dispatchEvent(new CustomEvent("theme-changed",{detail:{theme:t}}))}}if(typeof window<"u"){let t=B.get(),e=window.document?.documentElement;e&&(e.classList.remove("light-theme","dark-theme"),e.classList.add(`${t}-theme`))}var Le=globalThis,Ne=Le.ShadowRoot&&(Le.ShadyCSS===void 0||Le.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,et=Symbol(),jt=new WeakMap,te=class{constructor(e,s,r){if(this._$cssResult$=!0,r!==et)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=s}get styleSheet(){let e=this.o,s=this.t;if(Ne&&e===void 0){let r=s!==void 0&&s.length===1;r&&(e=jt.get(s)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&jt.set(s,e))}return e}toString(){return this.cssText}},zt=t=>new te(typeof t=="string"?t:t+"",void 0,et),y=(t,...e)=>{let s=t.length===1?t[0]:e.reduce(((r,n,i)=>r+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+t[i+1]),t[0]);return new te(s,t,et)},Bt=(t,e)=>{if(Ne)t.adoptedStyleSheets=e.map((s=>s instanceof CSSStyleSheet?s:s.styleSheet));else for(let s of e){let r=document.createElement("style"),n=Le.litNonce;n!==void 0&&r.setAttribute("nonce",n),r.textContent=s.cssText,t.appendChild(r)}},tt=Ne?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let s="";for(let r of e.cssRules)s+=r.cssText;return zt(s)})(t):t;var{is:Fs,defineProperty:Gs,getOwnPropertyDescriptor:Zs,getOwnPropertyNames:Ks,getOwnPropertySymbols:Js,getPrototypeOf:Ys}=Object,O=globalThis,qt=O.trustedTypes,Xs=qt?qt.emptyScript:"",Qs=O.reactiveElementPolyfillSupport,se=(t,e)=>t,st={toAttribute(t,e){switch(e){case Boolean:t=t?Xs:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=t!==null;break;case Number:s=t===null?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch{s=null}}return s}},Gt=(t,e)=>!Fs(t,e),Ft={attribute:!0,type:String,converter:st,reflect:!1,useDefault:!1,hasChanged:Gt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),O.litPropertyMetadata??(O.litPropertyMetadata=new WeakMap);var N=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,s=Ft){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(e,s),!s.noAccessor){let r=Symbol(),n=this.getPropertyDescriptor(e,r,s);n!==void 0&&Gs(this.prototype,e,n)}}static getPropertyDescriptor(e,s,r){let{get:n,set:i}=Zs(this.prototype,e)??{get(){return this[s]},set(o){this[s]=o}};return{get:n,set(o){let p=n?.call(this);i?.call(this,o),this.requestUpdate(e,p,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Ft}static _$Ei(){if(this.hasOwnProperty(se("elementProperties")))return;let e=Ys(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(se("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(se("properties"))){let s=this.properties,r=[...Ks(s),...Js(s)];for(let n of r)this.createProperty(n,s[n])}let e=this[Symbol.metadata];if(e!==null){let s=litPropertyMetadata.get(e);if(s!==void 0)for(let[r,n]of s)this.elementProperties.set(r,n)}this._$Eh=new Map;for(let[s,r]of this.elementProperties){let n=this._$Eu(s,r);n!==void 0&&this._$Eh.set(n,s)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let s=[];if(Array.isArray(e)){let r=new Set(e.flat(1/0).reverse());for(let n of r)s.unshift(tt(n))}else e!==void 0&&s.push(tt(e));return s}static _$Eu(e,s){let r=s.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??(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,s=this.constructor.elementProperties;for(let r of s.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Bt(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,s,r){this._$AK(e,r)}_$ET(e,s){let r=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,r);if(n!==void 0&&r.reflect===!0){let i=(r.converter?.toAttribute!==void 0?r.converter:st).toAttribute(s,r.type);this._$Em=e,i==null?this.removeAttribute(n):this.setAttribute(n,i),this._$Em=null}}_$AK(e,s){let r=this.constructor,n=r._$Eh.get(e);if(n!==void 0&&this._$Em!==n){let i=r.getPropertyOptions(n),o=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:st;this._$Em=n;let p=o.fromAttribute(s,i.type);this[n]=p??this._$Ej?.get(n)??p,this._$Em=null}}requestUpdate(e,s,r){if(e!==void 0){let n=this.constructor,i=this[e];if(r??(r=n.getPropertyOptions(e)),!((r.hasChanged??Gt)(i,s)||r.useDefault&&r.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(n._$Eu(e,r))))return;this.C(e,s,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,s,{useDefault:r,reflect:n,wrapped:i},o){r&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,o??s??this[e]),i!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||r||(s=void 0),this._$AL.set(e,s)),n===!0&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(s){Promise.reject(s)}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.renderRoot=this.createRenderRoot()),this._$Ep){for(let[n,i]of this._$Ep)this[n]=i;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[n,i]of r){let{wrapped:o}=i,p=this[n];o!==!0||this._$AL.has(n)||p===void 0||this.C(n,void 0,i,p)}}let e=!1,s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),this._$EO?.forEach((r=>r.hostUpdate?.())),this.update(s)):this._$EM()}catch(r){throw e=!1,this._$EM(),r}e&&this._$AE(s)}willUpdate(e){}_$AE(e){this._$EO?.forEach((s=>s.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=this._$Eq.forEach((s=>this._$ET(s,this[s])))),this._$EM()}updated(e){}firstUpdated(e){}};N.elementStyles=[],N.shadowRootOptions={mode:"open"},N[se("elementProperties")]=new Map,N[se("finalized")]=new Map,Qs?.({ReactiveElement:N}),(O.reactiveElementVersions??(O.reactiveElementVersions=[])).push("2.1.1");var re=globalThis,h=class extends N{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var s;let e=super.createRenderRoot();return(s=this.renderOptions).renderBefore??(s.renderBefore=e.firstChild),e}update(e){let s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Mt(s,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return L}};h._$litElement$=!0,h.finalized=!0,re.litElementHydrateSupport?.({LitElement:h});var er=re.litElementPolyfillSupport;er?.({LitElement:h});(re.litElementVersions??(re.litElementVersions=[])).push("4.2.1");var ne=class extends h{constructor(){super(),this._handleLanguageChange=()=>{this._updateText()},this.variant="title",this.disabled=!1,this.bold=!1,this["no-background"]=!1,this.blank=!1,this.key="",this.fallback="",this.language="en-US",this.defaultText="",this.href="",this._loading=!1,this._text=null}connectedCallback(){super.connectedCallback(),this._updateText(),window.addEventListener("language-changed",this._handleLanguageChange)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("language-changed",this._handleLanguageChange)}updated(e){super.updated(e),(e.has("key")||e.has("defaultText"))&&this._updateText()}_updateText(){this.key?this._text=fe(this.key):this._text=this.defaultText||this.fallback||null,this.requestUpdate()}render(){return a`
4
4
  <button
5
5
  class=${this.variant}
6
6
  ?disabled=${this.disabled}
@@ -8,9 +8,9 @@ function as(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
8
8
  ?no-background=${this["no-background"]}
9
9
  @click=${this._handleClick}
10
10
  >
11
- ${this._notionText?this._notionText:a`<slot></slot>`}
11
+ ${this._text?this._text:a`<slot></slot>`}
12
12
  </button>
13
- `}_handleClick(e){if(this.disabled){e.preventDefault(),e.stopPropagation();return}if(this.href){e.preventDefault(),e.stopPropagation(),this.blank?window.open(this.href,"_blank","noopener,noreferrer"):window.location.href=this.href;return}}};re.properties={variant:{type:String,reflect:!0},disabled:{type:Boolean,reflect:!0},bold:{type:Boolean,reflect:!0},"no-background":{type:Boolean,reflect:!0,attribute:"no-background"},blank:{type:Boolean,reflect:!0},notionKey:{type:String,attribute:"notion-key"},key:{type:String},fallback:{type:String},language:{type:String},defaultText:{type:String,attribute:"default-text"},href:{type:String},_loading:{type:Boolean,state:!0},_notionText:{type:String,state:!0}};re.styles=y`
13
+ `}_handleClick(e){if(this.disabled){e.preventDefault(),e.stopPropagation();return}if(this.href){e.preventDefault(),e.stopPropagation(),this.blank?window.open(this.href,"_blank","noopener,noreferrer"):window.location.href=this.href;return}}};ne.properties={variant:{type:String,reflect:!0},disabled:{type:Boolean,reflect:!0},bold:{type:Boolean,reflect:!0},"no-background":{type:Boolean,reflect:!0,attribute:"no-background"},blank:{type:Boolean,reflect:!0},key:{type:String},fallback:{type:String},language:{type:String},defaultText:{type:String,attribute:"default-text"},href:{type:String},_loading:{type:Boolean,state:!0},_text:{type:String,state:!0}};ne.styles=y`
14
14
  button {
15
15
  max-height: calc(var(--08) * var(--scaling-factor));
16
16
  border: none;
@@ -60,7 +60,7 @@ function as(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
60
60
  .loading {
61
61
  opacity: 0.7;
62
62
  }
63
- `;customElements.define("ds-button",re);var ie=class extends j{constructor(e){if(super(e),this.it=b,e.type!==we.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===b||e==null)return this._t=void 0,this.it=e;if(e===N)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 s=[e];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}};ie.directiveName="unsafeHTML",ie.resultType=1;var Jt=Z(ie);var q=class t extends h{get type(){return this._type}set type(e){let s=this._type;this._type=e,this.requestUpdate("type",s)}constructor(){super(),this._type="",this.size="1em",this.color="currentColor",this.background="transparent",console.log("Icon constructor",this._type)}connectedCallback(){super.connectedCallback(),console.log("Icon connected",this._type)}renderIcon(){if(console.log("renderIcon called with type:",this._type),!this._type||this._type==="")return console.log("No type specified, rendering default slot"),a`<div class="icon-container"><slot></slot></div>`;let e=t.iconNameToSvgMap[this._type.toLowerCase()];if(e)return a`<div class="icon-container">${Jt(e)}</div>`;switch(this._type.toLowerCase()){case"close":return console.log("Rendering close icon"),a`
63
+ `;customElements.define("ds-button",ne);var ie=class extends j{constructor(e){if(super(e),this.it=b,e.type!==we.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===b||e==null)return this._t=void 0,this.it=e;if(e===L)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 s=[e];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}};ie.directiveName="unsafeHTML",ie.resultType=1;var Zt=Z(ie);var q=class t extends h{get type(){return this._type}set type(e){let s=this._type;this._type=e,this.requestUpdate("type",s)}constructor(){super(),this._type="",this.size="1em",this.color="currentColor",this.background="transparent",console.log("Icon constructor",this._type)}connectedCallback(){super.connectedCallback(),console.log("Icon connected",this._type)}renderIcon(){if(console.log("renderIcon called with type:",this._type),!this._type||this._type==="")return console.log("No type specified, rendering default slot"),a`<div class="icon-container"><slot></slot></div>`;let e=t.iconNameToSvgMap[this._type.toLowerCase()];if(e)return a`<div class="icon-container">${Zt(e)}</div>`;switch(this._type.toLowerCase()){case"close":return console.log("Rendering close icon"),a`
64
64
  <div class="icon-container">
65
65
  <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
66
66
  <path
@@ -253,7 +253,7 @@ function as(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
253
253
  :host {
254
254
  --notes-style-color: #ffb6b9;
255
255
  }
256
- `;q.iconNameToSvgMap=(()=>{try{let t=import.meta.glob("../x Icon/*.svg",{as:"raw",eager:!0}),e={};for(let[s,n]of Object.entries(t)){let i=(s.split("/").pop()??"").replace(/\.svg$/i,"").toLowerCase();i&&(e[i]=n)}return e}catch(t){return console.warn("Icon: failed to glob SVGs from x Icon/; falling back only to inline switch icons.",t),{}}})();customElements.define("ds-icon",q);console.log("Icon component registered with custom elements registry");var Ie=class extends h{static get properties(){return{key:{type:String,reflect:!0},defaultValue:{type:String,reflect:!0,attribute:"default-value"},fallback:{type:String,reflect:!0},_text:{type:String,state:!0}}}constructor(){super(),this.key="",this.defaultValue="",this.fallback="",this._text="",this.boundHandlers={languageChanged:(()=>{console.log("Language changed event received in ds-text"),this._loadText()})}}connectedCallback(){super.connectedCallback(),this._loadText(),window.addEventListener("language-changed",this.boundHandlers.languageChanged),window.addEventListener("translations-loaded",this.boundHandlers.languageChanged)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("language-changed",this.boundHandlers.languageChanged),window.removeEventListener("translations-loaded",this.boundHandlers.languageChanged)}updated(e){super.updated(e),(e.has("key")||e.has("defaultValue"))&&this._loadText()}_loadText(){if(!this.key){this._text=this.defaultValue||this.fallback||"";return}try{let e=fe(this.key);this._text=e||this.defaultValue||this.fallback||this.key}catch(e){console.error("Error loading text for key:",this.key,e),this._text=this.defaultValue||this.fallback||this.key}this.requestUpdate()}render(){return a`<span>${this._text||this.defaultValue||this.key}</span>`}};Ie.styles=y`
256
+ `;q.iconNameToSvgMap=(()=>{try{let t=import.meta.glob("../x Icon/*.svg",{as:"raw",eager:!0}),e={};for(let[s,r]of Object.entries(t)){let i=(s.split("/").pop()??"").replace(/\.svg$/i,"").toLowerCase();i&&(e[i]=r)}return e}catch(t){return console.warn("Icon: failed to glob SVGs from x Icon/; falling back only to inline switch icons.",t),{}}})();customElements.define("ds-icon",q);console.log("Icon component registered with custom elements registry");var Ie=class extends h{static get properties(){return{key:{type:String,reflect:!0},defaultValue:{type:String,reflect:!0,attribute:"default-value"},fallback:{type:String,reflect:!0},_text:{type:String,state:!0}}}constructor(){super(),this.key="",this.defaultValue="",this.fallback="",this._text="",this.boundHandlers={languageChanged:(()=>{console.log("Language changed event received in ds-text"),this._loadText()})}}connectedCallback(){super.connectedCallback(),this._loadText(),window.addEventListener("language-changed",this.boundHandlers.languageChanged),window.addEventListener("translations-loaded",this.boundHandlers.languageChanged)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("language-changed",this.boundHandlers.languageChanged),window.removeEventListener("translations-loaded",this.boundHandlers.languageChanged)}updated(e){super.updated(e),(e.has("key")||e.has("defaultValue"))&&this._loadText()}_loadText(){if(!this.key){this._text=this.defaultValue||this.fallback||"";return}try{let e=fe(this.key);this._text=e||this.defaultValue||this.fallback||this.key}catch(e){console.error("Error loading text for key:",this.key,e),this._text=this.defaultValue||this.fallback||this.key}this.requestUpdate()}render(){return a`<span>${this._text||this.defaultValue||this.key}</span>`}};Ie.styles=y`
257
257
  :host {
258
258
  display: inline;
259
259
  font-family: var(--typeface);
@@ -267,7 +267,7 @@ function as(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
267
267
  text-transform: var(--text-transform-default);
268
268
  text-decoration: var(--text-decoration-default);
269
269
  }
270
- `;customElements.define("ds-text",Ie);var rn=t=>{localStorage.setItem("accentColor",t)},it=()=>localStorage.getItem("accentColor")||"--blue",rt=()=>{let t=it();document.documentElement.style.setProperty("--accent-color",`var(${t})`)},on=t=>{localStorage.setItem("notesStyleMedium",t)},Yt=()=>localStorage.getItem("notesStyleMedium")||"note",Xt=t=>{localStorage.setItem("pageStyle",t)},oe=()=>localStorage.getItem("pageStyle")||"note",Oe=class extends h{static get properties(){return{type:{type:String},values:{type:Array},label:{type:String},currentValue:{type:String,state:!0},translationsReady:{type:Boolean,state:!0},disabled:{type:Boolean,state:!0},variant:{type:String}}}constructor(){super(),this.type="",this.values=[],this.label="",this.currentValue="",this.translationsReady=!1,this.disabled=!1,this.variant="",this.boundHandlers={translationsLoaded:this.handleTranslationsLoaded.bind(this),languageChanged:this.handleLanguageChanged.bind(this),handleLanguageChanged:this.handleLanguageChanged.bind(this),handleThemeChanged:this.handleThemeChanged.bind(this),handleAccentColorChanged:this.handleAccentColorChanged.bind(this),handleNoteBehaviorChanged:this.handleNoteBehaviorChanged.bind(this)}}connectedCallback(){super.connectedCallback(),window.addEventListener("translations-loaded",this.boundHandlers.translationsLoaded),window.addEventListener("language-changed",this.boundHandlers.languageChanged),window.addEventListener("theme-changed",this.boundHandlers.handleThemeChanged),window.addEventListener("accent-color-changed",this.boundHandlers.handleAccentColorChanged),window.addEventListener("page-style-changed",this.boundHandlers.handleNoteBehaviorChanged),this.initializeValues()}async initializeValues(){if(this.type==="language"){let e=Re();this.values=e,this.currentValue=k.value,this.label=this.getLabel()}else if(this.type==="theme"){this.values=["light","dark"];let e=B.get();this.currentValue=e,this.label=this.getLabel()}else if(this.type==="accent-color"){this.values=["--light-green","--green","--light-blue","--blue","--pink","--red","--orange","--yellow"];let e=it();this.currentValue=e,rt(),this.label=this.getLabel()}else if(this.type==="notes-style-medium"){this.values=["default","big","gallery"];let e=Yt();this.currentValue=e;let s=oe();this.disabled=s==="note",this.label=this.getLabel()}else if(this.type==="page-style"){this.values=["note","page"];let e=oe();this.currentValue=e,this.label=this.getLabel()}else this.type==="icon-only"&&(this.values=["note","page"],this.currentValue=this.values[0],this.label="");this.requestUpdate()}ensureThemeInitialized(){if(!localStorage.getItem("theme")){let n=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";localStorage.setItem("theme",n),document.documentElement.classList.add(`${n}-theme`)}}attributeChangedCallback(e,s,n){super.attributeChangedCallback(e,s,n),e==="type"&&s!==n&&this.initializeValues()}async setupInitialValue(){if(this.type==="language"){let e=k.value;this.currentValue=e,this.label=this.getLabel()}else if(this.type==="theme"){let e=B.get();this.currentValue=e,this.label=this.getLabel()}else if(this.type==="accent-color"){let e=it();this.currentValue=e,rt(),this.label=this.getLabel()}else if(this.type==="notes-style-medium"){let e=Yt();this.currentValue=e;let s=oe();this.disabled=s==="note",this.label=this.getLabel()}else if(this.type==="page-style"){let e=oe();this.currentValue=e,this.label=this.getLabel()}else if(this.type==="icon-only"){let e=oe();this.currentValue=e,this.label=""}this.requestUpdate()}handleSettingsChanges(){this.setupInitialValue()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("translations-loaded",this.boundHandlers.translationsLoaded),window.removeEventListener("language-changed",this.boundHandlers.languageChanged),window.removeEventListener("theme-changed",this.boundHandlers.handleThemeChanged),window.removeEventListener("accent-color-changed",this.boundHandlers.handleAccentColorChanged),window.removeEventListener("page-style-changed",this.boundHandlers.handleNoteBehaviorChanged)}handleButtonClick(e){if(e.preventDefault(),e.stopPropagation(),!this.disabled){if(this.type==="language"){let n=(this.values.indexOf(this.currentValue)+1)%this.values.length,r=this.values[n];this.currentValue=r,document.startViewTransition?document.startViewTransition(()=>{De(r)}):De(r),P({language:r}),window.dispatchEvent(new CustomEvent("language-changed",{detail:{language:r}}))}else if(this.type==="theme"){let n=(this.values.indexOf(this.currentValue)+1)%this.values.length,r=this.values[n];this.currentValue=r,zt(r),P({theme:r})}else if(this.type==="accent-color"){let n=(this.values.indexOf(this.currentValue)+1)%this.values.length,r=this.values[n];this.currentValue=r,rn(r),rt(),P({accentColor:r}),window.dispatchEvent(new CustomEvent("accent-color-changed",{detail:{color:r}}))}else if(this.type==="notes-style-medium"){let n=(this.values.indexOf(this.currentValue)+1)%this.values.length,r=this.values[n];this.currentValue=r,on(r),P({notesStyleMedium:r}),window.dispatchEvent(new CustomEvent("notes-style-medium-changed",{detail:{style:r}}))}else if(this.type==="page-style"){let n=(this.values.indexOf(this.currentValue)+1)%this.values.length,r=this.values[n];this.currentValue=r,Xt(r),P({pageStyle:r}),window.dispatchEvent(new CustomEvent("page-style-changed",{detail:{behavior:r}}))}else if(this.type==="icon-only"){let n=(this.values.indexOf(this.currentValue)+1)%this.values.length,r=this.values[n];this.currentValue=r,Xt(r),P({pageStyle:r}),this.label="",window.dispatchEvent(new CustomEvent("page-style-changed",{detail:{behavior:r}}))}this.label=this.getLabel(),this.requestUpdate()}}getValueDisplay(e){if(this.type==="language")return bt(e,{locale:k.value});if(this.type==="theme"){if(this.translationsReady){let s=T(`themes.${e}`);if(s&&s!==`themes.${e}`)return s}return e}else{if(this.type==="accent-color")return this.getColorName(e);if(this.type==="notes-style-medium")return this.getNotesStyleIcon(e);if(this.type==="page-style"){if(this.translationsReady){let s=T(e==="note"?"note":"page");if(s&&s!==(e==="note"?"note":"page"))return s}return e}else if(this.type==="icon-only")return e==="note"?a`<ds-icon type="note"></ds-icon>`:e==="page"?a`<ds-icon type="page"></ds-icon>`:a`<span>${e}</span>`}return e}getColorName(e){let n={"--red":"red","--orange":"orange","--yellow":"yellow","--light-green":"lightGreen","--green":"green","--light-blue":"lightBlue","--blue":"blue","--pink":"pink"}[e];if(n&&this.translationsReady){let r=T(n);if(r&&r!==n)return r}return e.replace("--","").replace("-"," ")}getNotesStyleIcon(e){return e==="page"?a`<ds-icon type="page"></ds-icon>`:e==="note"?a`<ds-icon type="note"></ds-icon>`:e==="default"?a`<ds-icon type="default"></ds-icon>`:e==="big"?a`<ds-icon type="big"></ds-icon>`:e==="gallery"?a`<ds-icon type="gallery"></ds-icon>`:a`<span>${e}</span>`}getLabel(){if(this.type==="language"){if(this.translationsReady){let e=T("language");if(e&&e!=="language")return e}return"Language"}else if(this.type==="theme"){if(this.translationsReady){let e=T("theme");if(e&&e!=="theme")return e}return"Theme"}else if(this.type==="accent-color"){if(this.translationsReady){let e=T("accentColor");if(e&&e!=="accentColor")return e}return"Accent Color"}else if(this.type==="notes-style-medium"){if(this.translationsReady){let e=T("notesStyle");if(e&&e!=="notesStyle")return e}return"Notes Style"}else if(this.type==="page-style"){if(this.translationsReady){let e=T("clickingItem");if(e&&e!=="clickingItem")return e}return"Clic"}else if(this.type==="icon-only")return"";return this.label}render(){return a`
270
+ `;customElements.define("ds-text",Ie);var tr=t=>{localStorage.setItem("accentColor",t)},nt=()=>localStorage.getItem("accentColor")||"--blue",rt=()=>{let t=nt();document.documentElement.style.setProperty("--accent-color",`var(${t})`)},sr=t=>{localStorage.setItem("notesStyleMedium",t)},Kt=()=>localStorage.getItem("notesStyleMedium")||"note",Jt=t=>{localStorage.setItem("pageStyle",t)},oe=()=>localStorage.getItem("pageStyle")||"note",Oe=class extends h{static get properties(){return{type:{type:String},values:{type:Array},label:{type:String},currentValue:{type:String,state:!0},translationsReady:{type:Boolean,state:!0},disabled:{type:Boolean,state:!0},variant:{type:String}}}constructor(){super(),this.type="",this.values=[],this.label="",this.currentValue="",this.translationsReady=!1,this.disabled=!1,this.variant="",this.boundHandlers={translationsLoaded:this.handleTranslationsLoaded.bind(this),languageChanged:this.handleLanguageChanged.bind(this),handleLanguageChanged:this.handleLanguageChanged.bind(this),handleThemeChanged:this.handleThemeChanged.bind(this),handleAccentColorChanged:this.handleAccentColorChanged.bind(this),handleNoteBehaviorChanged:this.handleNoteBehaviorChanged.bind(this)}}connectedCallback(){super.connectedCallback(),window.addEventListener("translations-loaded",this.boundHandlers.translationsLoaded),window.addEventListener("language-changed",this.boundHandlers.languageChanged),window.addEventListener("theme-changed",this.boundHandlers.handleThemeChanged),window.addEventListener("accent-color-changed",this.boundHandlers.handleAccentColorChanged),window.addEventListener("page-style-changed",this.boundHandlers.handleNoteBehaviorChanged),this.initializeValues()}async initializeValues(){if(this.type==="language"){let e=Me();this.values=e,this.currentValue=T.value,this.label=this.getLabel()}else if(this.type==="theme"){this.values=["light","dark"];let e=B.get();this.currentValue=e,this.label=this.getLabel()}else if(this.type==="accent-color"){this.values=["--light-green","--green","--light-blue","--blue","--pink","--red","--orange","--yellow"];let e=nt();this.currentValue=e,rt()}else if(this.type==="notes-style-medium"){this.values=["default","big","gallery"];let e=Kt();this.currentValue=e;let s=oe();this.disabled=s==="note",this.label=this.getLabel()}else if(this.type==="page-style"){this.values=["note","page"];let e=oe();this.currentValue=e,this.label=this.getLabel()}else this.type==="icon-only"&&(this.values=["note","page"],this.currentValue=this.values[0],this.label="");this.requestUpdate()}ensureThemeInitialized(){if(!localStorage.getItem("theme")){let r=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";localStorage.setItem("theme",r),document.documentElement.classList.add(`${r}-theme`)}}attributeChangedCallback(e,s,r){super.attributeChangedCallback(e,s,r),e==="type"&&s!==r&&this.initializeValues()}async setupInitialValue(){if(this.type==="language"){let e=T.value;this.currentValue=e,this.label=this.getLabel()}else if(this.type==="theme"){let e=B.get();this.currentValue=e,this.label=this.getLabel()}else if(this.type==="accent-color"){let e=nt();this.currentValue=e,rt()}else if(this.type==="notes-style-medium"){let e=Kt();this.currentValue=e;let s=oe();this.disabled=s==="note",this.label=this.getLabel()}else if(this.type==="page-style"){let e=oe();this.currentValue=e,this.label=this.getLabel()}else if(this.type==="icon-only"){let e=oe();this.currentValue=e,this.label=""}this.requestUpdate()}handleSettingsChanges(){this.setupInitialValue()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("translations-loaded",this.boundHandlers.translationsLoaded),window.removeEventListener("language-changed",this.boundHandlers.languageChanged),window.removeEventListener("theme-changed",this.boundHandlers.handleThemeChanged),window.removeEventListener("accent-color-changed",this.boundHandlers.handleAccentColorChanged),window.removeEventListener("page-style-changed",this.boundHandlers.handleNoteBehaviorChanged)}handleButtonClick(e){if(e.preventDefault(),e.stopPropagation(),!this.disabled){if(this.type==="language"){let r=(this.values.indexOf(this.currentValue)+1)%this.values.length,n=this.values[r];this.currentValue=n,document.startViewTransition?document.startViewTransition(()=>{Re(n)}):Re(n),P({language:n}),window.dispatchEvent(new CustomEvent("language-changed",{detail:{language:n}}))}else if(this.type==="theme"){let r=(this.values.indexOf(this.currentValue)+1)%this.values.length,n=this.values[r];this.currentValue=n,Wt(n),P({theme:n})}else if(this.type==="accent-color"){let r=(this.values.indexOf(this.currentValue)+1)%this.values.length,n=this.values[r];this.currentValue=n,tr(n),rt(),P({accentColor:n}),window.dispatchEvent(new CustomEvent("accent-color-changed",{detail:{color:n}}))}else if(this.type==="notes-style-medium"){let r=(this.values.indexOf(this.currentValue)+1)%this.values.length,n=this.values[r];this.currentValue=n,sr(n),P({notesStyleMedium:n}),window.dispatchEvent(new CustomEvent("notes-style-medium-changed",{detail:{style:n}}))}else if(this.type==="page-style"){let r=(this.values.indexOf(this.currentValue)+1)%this.values.length,n=this.values[r];this.currentValue=n,Jt(n),P({pageStyle:n}),window.dispatchEvent(new CustomEvent("page-style-changed",{detail:{behavior:n}}))}else if(this.type==="icon-only"){let r=(this.values.indexOf(this.currentValue)+1)%this.values.length,n=this.values[r];this.currentValue=n,Jt(n),P({pageStyle:n}),this.label="",window.dispatchEvent(new CustomEvent("page-style-changed",{detail:{behavior:n}}))}this.label=this.getLabel(),this.requestUpdate()}}getValueDisplay(e){if(this.type==="language")return yt(e,{locale:T.value});if(this.type==="theme"){if(this.translationsReady){let s=C(e);if(s&&s!==e)return s}return e}else{if(this.type==="accent-color")return this.getColorName(e);if(this.type==="notes-style-medium")return this.getNotesStyleIcon(e);if(this.type==="page-style"){if(this.translationsReady){let s=C(e==="note"?"note":"page");if(s&&s!==(e==="note"?"note":"page"))return s}return e}else if(this.type==="icon-only")return e==="note"?a`<ds-icon type="note"></ds-icon>`:e==="page"?a`<ds-icon type="page"></ds-icon>`:a`<span>${e}</span>`}return e}getColorName(e){let r={"--red":"red","--orange":"orange","--yellow":"yellow","--light-green":"lightGreen","--green":"green","--light-blue":"lightBlue","--blue":"blue","--pink":"pink"}[e];if(r&&this.translationsReady){let n=C(r);if(n&&n!==r)return n}return e.replace("--","").replace("-"," ")}getNotesStyleIcon(e){return e==="page"?a`<ds-icon type="page"></ds-icon>`:e==="note"?a`<ds-icon type="note"></ds-icon>`:e==="default"?a`<ds-icon type="default"></ds-icon>`:e==="big"?a`<ds-icon type="big"></ds-icon>`:e==="gallery"?a`<ds-icon type="gallery"></ds-icon>`:a`<span>${e}</span>`}getLabel(){if(this.type==="language"){if(this.translationsReady){let e=C("language");if(e&&e!=="language")return e}return"Language"}else if(this.type==="theme"){if(this.translationsReady){let e=C("theme");if(e&&e!=="theme")return e}return"Theme"}else if(this.type==="accent-color"){if(this.translationsReady){let e=C("accentColor");if(e&&e!=="accentColor")return e}return"Accent Color"}else if(this.type==="notes-style-medium"){if(this.translationsReady){let e=C("notesStyle");if(e&&e!=="notesStyle")return e}return"Notes Style"}else if(this.type==="page-style"){if(this.translationsReady){let e=C("clickingItem");if(e&&e!=="clickingItem")return e}return"Clic"}else if(this.type==="icon-only")return"";return this.label}render(){return a`
271
271
  <div class="cycle-container">
272
272
  ${this.type!=="icon-only"?a`${this.type==="language"?a`<ds-text
273
273
  key="language"
@@ -277,7 +277,11 @@ function as(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
277
277
  key="theme"
278
278
  default-value="Theme"
279
279
  class="cycle-label"
280
- ></ds-text>`:a`<span class="cycle-label">${this.label}</span>`}`:""}
280
+ ></ds-text>`:this.type==="accent-color"?a`<ds-text
281
+ key="accentColor"
282
+ default-value="Accent color"
283
+ class="cycle-label"
284
+ ></ds-text>`:a`<span class="cycle-label">${this.label}</span>`}`:""}
281
285
  <div
282
286
  style="display: flex; align-items: center; ${this.type==="icon-only"?"justify-content: center;":""}"
283
287
  >
@@ -299,7 +303,7 @@ function as(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
299
303
  `:""}
300
304
  </div>
301
305
  </div>
302
- `}async waitForTranslations(){return new Promise(e=>{if(this.translationsReady){e();return}let s=()=>{this.translationsReady=!0,e()};window.addEventListener("translations-loaded",s,{once:!0}),setTimeout(()=>{this.translationsReady=!0,e()},5e3)})}handleTranslationsLoaded(){if(this.translationsReady=!0,this.type==="language"){let e=Re();this.values=e}this.setupInitialValue()}handleLanguageChanged(){this.setupInitialValue()}handleThemeChanged(){this.setupInitialValue()}handleAccentColorChanged(){this.setupInitialValue()}handleNoteBehaviorChanged(){this.setupInitialValue()}};Oe.styles=y`
306
+ `}async waitForTranslations(){return new Promise(e=>{if(this.translationsReady){e();return}let s=()=>{this.translationsReady=!0,e()};window.addEventListener("translations-loaded",s,{once:!0}),setTimeout(()=>{this.translationsReady=!0,e()},5e3)})}handleTranslationsLoaded(){if(this.translationsReady=!0,this.type==="language"){let e=Me();this.values=e}this.setupInitialValue()}handleLanguageChanged(){this.setupInitialValue()}handleThemeChanged(){this.setupInitialValue()}handleAccentColorChanged(){this.setupInitialValue()}handleNoteBehaviorChanged(){this.setupInitialValue()}};Oe.styles=y`
303
307
  .cycle-container {
304
308
  display: flex;
305
309
  justify-content: space-between;
@@ -310,7 +314,7 @@ function as(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
310
314
  .cycle-label {
311
315
  color: var(--text-color-primary);
312
316
  }
313
- `;customElements.define("ds-cycle",Oe);var ae=class extends h{constructor(){super(),this.key="",this.defaultValue="",this._text="",this._visible=!1,this.boundWindowHandlers={languageChanged:(()=>{this._loadText()}),translationsLoaded:(()=>{this._loadText()})},this.boundHostHandlers={mouseenter:(()=>{this._visible=!0,this.requestUpdate()}),mouseleave:(()=>{this._visible=!1,this.requestUpdate()}),focusin:(()=>{this._visible=!0,this.requestUpdate()}),focusout:(()=>{this._visible=!1,this.requestUpdate()})}}connectedCallback(){super.connectedCallback(),this._loadText(),window.addEventListener("language-changed",this.boundWindowHandlers.languageChanged),window.addEventListener("translations-loaded",this.boundWindowHandlers.translationsLoaded),this.addEventListener("mouseenter",this.boundHostHandlers.mouseenter),this.addEventListener("mouseleave",this.boundHostHandlers.mouseleave),this.addEventListener("focusin",this.boundHostHandlers.focusin),this.addEventListener("focusout",this.boundHostHandlers.focusout)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("language-changed",this.boundWindowHandlers.languageChanged),window.removeEventListener("translations-loaded",this.boundWindowHandlers.translationsLoaded),this.removeEventListener("mouseenter",this.boundHostHandlers.mouseenter),this.removeEventListener("mouseleave",this.boundHostHandlers.mouseleave),this.removeEventListener("focusin",this.boundHostHandlers.focusin),this.removeEventListener("focusout",this.boundHostHandlers.focusout)}updated(e){(e.has("key")||e.has("defaultValue"))&&this._loadText()}async _loadText(){if(!this.key){this._text=this.defaultValue||"",this.requestUpdate();return}try{let e=await wt(this.key);if(e){this._text=e,this.requestUpdate();return}let s=T(this.key);this._text=s&&s!==this.key?s:this.defaultValue||this.key}catch(e){console.error("ds-tooltip: error loading text for key",this.key,e),this._text=this.defaultValue||this.key}this.requestUpdate()}render(){let e=["bubble",this._visible?"visible":""].join(" ");return a`
317
+ `;customElements.define("ds-cycle",Oe);var ae=class extends h{constructor(){super(),this.key="",this.defaultValue="",this._text="",this._visible=!1,this.boundWindowHandlers={languageChanged:(()=>{this._loadText()}),translationsLoaded:(()=>{this._loadText()})},this.boundHostHandlers={mouseenter:(()=>{this._visible=!0,this.requestUpdate()}),mouseleave:(()=>{this._visible=!1,this.requestUpdate()}),focusin:(()=>{this._visible=!0,this.requestUpdate()}),focusout:(()=>{this._visible=!1,this.requestUpdate()})}}connectedCallback(){super.connectedCallback(),this._loadText(),window.addEventListener("language-changed",this.boundWindowHandlers.languageChanged),window.addEventListener("translations-loaded",this.boundWindowHandlers.translationsLoaded),this.addEventListener("mouseenter",this.boundHostHandlers.mouseenter),this.addEventListener("mouseleave",this.boundHostHandlers.mouseleave),this.addEventListener("focusin",this.boundHostHandlers.focusin),this.addEventListener("focusout",this.boundHostHandlers.focusout)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("language-changed",this.boundWindowHandlers.languageChanged),window.removeEventListener("translations-loaded",this.boundWindowHandlers.translationsLoaded),this.removeEventListener("mouseenter",this.boundHostHandlers.mouseenter),this.removeEventListener("mouseleave",this.boundHostHandlers.mouseleave),this.removeEventListener("focusin",this.boundHostHandlers.focusin),this.removeEventListener("focusout",this.boundHostHandlers.focusout)}updated(e){(e.has("key")||e.has("defaultValue"))&&this._loadText()}_loadText(){if(!this.key){this._text=this.defaultValue||"",this.requestUpdate();return}try{let e=C(this.key);this._text=e&&e!==this.key?e:this.defaultValue||this.key}catch(e){console.error("ds-tooltip: error loading text for key",this.key,e),this._text=this.defaultValue||this.key}this.requestUpdate()}render(){let e=["bubble",this._visible?"visible":""].join(" ");return a`
314
318
  <span class="slot-wrapper"><slot></slot></span>
315
319
  ${this._text?a`<div class="${e}">${this._text}</div>`:null}
316
320
  `}};ae.properties={key:{type:String,reflect:!0},defaultValue:{type:String,reflect:!0,attribute:"default-value"},_text:{state:!0},_visible:{state:!0}};ae.styles=y`
@@ -548,11 +552,11 @@ function as(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
548
552
  right: 0;
549
553
  transform: none;
550
554
  }
551
- `;customElements.define("ds-grid",de);var ue=class extends h{constructor(){super(...arguments),this.mode="portfolio"}render(){let e=this.debug||this.mode==="debug",s=this.mode==="portfolio",n=this.mode==="company",r=this.mode==="app";return a`
555
+ `;customElements.define("ds-grid",de);var ue=class extends h{constructor(){super(...arguments),this.mode="portfolio"}render(){let e=this.debug||this.mode==="debug",s=this.mode==="portfolio",r=this.mode==="company",n=this.mode==="app";return a`
552
556
  <slot></slot>
553
557
  ${e?a`
554
558
  <div class="debug-overlay">
555
- ${r?a`
559
+ ${n?a`
556
560
  <div class="debug-area debug-banner">
557
561
  <ds-text key="banner">banner</ds-text>
558
562
  </div>
@@ -566,7 +570,7 @@ function as(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
566
570
  <div class="debug-area debug-footer-app">
567
571
  <ds-text key="footer">footer</ds-text>
568
572
  </div>
569
- `:n?a`
573
+ `:r?a`
570
574
  <div class="debug-area debug-header">
571
575
  <ds-text key="header">header</ds-text>
572
576
  </div>
@@ -810,7 +814,7 @@ function as(){if(typeof navigator>"u"||typeof window>"u")return!1;let t=navigato
810
814
  grid-area: footer;
811
815
  border-color: #ffa500;
812
816
  }
813
- `;customElements.define("ds-layout",ue);export{re as Button,Oe as Cycle,Pe as DateComponent,ce as DsTable,de as Grid,q as Icon,ue as Layout,He as List,le as Row,Ie as Text,ae as Tooltip,k as currentLanguage,B as currentTheme,as as detectMobileDevice,un as getAvailableLanguages,Re as getAvailableLanguagesSync,vs as getBrowserLanguage,ls as getDeviceInfo,bt as getLanguageDisplayName,wt as getNotionText,gn as getPriceLabel,fe as getText,cn as hasTranslation,Ve as initDeviceDetection,hn as loadTranslations,P as savePreferences,De as setLanguage,dn as setNotionText,zt as setTheme,T as translate};
817
+ `;customElements.define("ds-layout",ue);export{ne as Button,Oe as Cycle,Pe as DateComponent,ce as DsTable,de as Grid,q as Icon,ue as Layout,He as List,le as Row,Ie as Text,ae as Tooltip,T as currentLanguage,B as currentTheme,is as detectMobileDevice,or as getAvailableLanguages,Me as getAvailableLanguagesSync,gs as getBrowserLanguage,os as getDeviceInfo,yt as getLanguageDisplayName,dr as getPriceLabel,fe as getText,ir as hasTranslation,Ve as initDeviceDetection,ar as loadTranslations,P as savePreferences,Re as setLanguage,Wt as setTheme,C as translate};
814
818
  /*! Bundled license information:
815
819
 
816
820
  signal-polyfill/dist/index.js: