ds-one 0.1.11-alpha.1 → 0.1.11-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DS1/1-root/fonts/GT-America-Compressed-Regular.woff2 +0 -0
- package/DS1/1-root/one.css +7 -0
- package/DS1/2-core/{text-v1.ts → ds-text.ts} +4 -4
- package/DS1/2-core/home-v1.ts +2 -2
- package/DS1/3-unit/doublenav-v1.ts +2 -2
- package/DS1/3-unit/singlenav-v1.ts +1 -1
- package/DS1/4-page/ds-grid.ts +5 -4
- package/DS1/4-page/ds-layout.ts +1 -20
- package/DS1/index.ts +1 -1
- package/README.md +5 -5
- package/dist/2-core/ds-text.d.ts +48 -0
- package/dist/2-core/ds-text.d.ts.map +1 -0
- package/dist/2-core/ds-text.js +83 -0
- package/dist/2-core/home-v1.js +2 -2
- package/dist/3-unit/doublenav-v1.js +2 -2
- package/dist/3-unit/singlenav-v1.js +1 -1
- package/dist/4-page/ds-grid.d.ts.map +1 -1
- package/dist/4-page/ds-grid.js +5 -4
- package/dist/4-page/ds-layout.d.ts.map +1 -1
- package/dist/4-page/ds-layout.js +1 -20
- package/dist/ds-one.bundle.js +14 -32
- package/dist/ds-one.bundle.js.map +3 -3
- package/dist/ds-one.bundle.min.js +17 -35
- package/dist/ds-one.bundle.min.js.map +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var kt=!1,Er=["./keys.json","./tekst.json","./tekster.json","./language.json","./languages.json","./translations.json","./translate.json","./i18n.json","./locales.json","./strings.json","./text.json","./texts.json"];function Ar(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 Lr(){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 r=document.querySelector('meta[name="ds-one:translations"]')?.getAttribute("content");if(r)return r;let n=document.querySelector('link[rel="ds-one-translations"]')?.getAttribute("href");return n||null}function Tr(){let t=new Set,e=typeof window<"u"?window.DS_ONE_TRANSLATIONS_FILE:null,r=Lr(),n=i=>{let s=Ar(i??"");s&&t.add(s)};return n(e??null),n(r),Er.forEach(i=>n(i)),Array.from(t)}function Nr(t){return!t||typeof t!="object"?!1:Object.values(t).every(e=>e&&typeof e=="object")}async function Ir(t){try{let e=await fetch(t);if(!e.ok)return null;let r=await e.json();return Nr(r)?Object.keys(r).length===0?(console.warn(`[DS one] No languages found in ${t}`),null):r:(console.warn(`[DS one] Invalid translation format in ${t}. Expected object with language codes as keys.`),null)}catch(e){return e instanceof TypeError&&e.message.includes("Failed to fetch")||console.error(`[DS one] Error loading external translations from ${t}:`,e),null}}async function Ct(){if(kt||(kt=!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=Tr();for(let e of t){let r=await Ir(e);if(!r)continue;window.DS_ONE_TRANSLATIONS=r;let n=Object.keys(r);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. Looked in: ${t.join(", ")}. Using bundled translations.`),!1}typeof window<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{Ct()}):Ct());var ve=globalThis,ye=ve.ShadowRoot&&(ve.ShadyCSS===void 0||ve.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Xe=Symbol(),Et=new WeakMap,G=class{constructor(e,r,n){if(this._$cssResult$=!0,n!==Xe)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=r}get styleSheet(){let e=this.o,r=this.t;if(ye&&e===void 0){let n=r!==void 0&&r.length===1;n&&(e=Et.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&Et.set(r,e))}return e}toString(){return this.cssText}},At=t=>new G(typeof t=="string"?t:t+"",void 0,Xe),c=(t,...e)=>{let r=t.length===1?t[0]:e.reduce(((n,i,s)=>n+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1]),t[0]);return new G(r,t,Xe)},Lt=(t,e)=>{if(ye)t.adoptedStyleSheets=e.map((r=>r instanceof CSSStyleSheet?r:r.styleSheet));else for(let r of e){let n=document.createElement("style"),i=ve.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,t.appendChild(n)}},Qe=ye?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(let n of e.cssRules)r+=n.cssText;return At(r)})(t):t;var{is:Mr,defineProperty:Vr,getOwnPropertyDescriptor:Hr,getOwnPropertyNames:Or,getOwnPropertySymbols:Dr,getPrototypeOf:Pr}=Object,V=globalThis,Tt=V.trustedTypes,Ur=Tt?Tt.emptyScript:"",Rr=V.reactiveElementPolyfillSupport,Z=(t,e)=>t,et={toAttribute(t,e){switch(e){case Boolean:t=t?Ur:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=t!==null;break;case Number:r=t===null?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch{r=null}}return r}},It=(t,e)=>!Mr(t,e),Nt={attribute:!0,type:String,converter:et,reflect:!1,useDefault:!1,hasChanged:It};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),V.litPropertyMetadata??(V.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,r=Nt){if(r.state&&(r.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((r=Object.create(r)).wrapped=!0),this.elementProperties.set(e,r),!r.noAccessor){let n=Symbol(),i=this.getPropertyDescriptor(e,n,r);i!==void 0&&Vr(this.prototype,e,i)}}static getPropertyDescriptor(e,r,n){let{get:i,set:s}=Hr(this.prototype,e)??{get(){return this[r]},set(a){this[r]=a}};return{get:i,set(a){let g=i?.call(this);s?.call(this,a),this.requestUpdate(e,g,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Nt}static _$Ei(){if(this.hasOwnProperty(Z("elementProperties")))return;let e=Pr(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Z("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Z("properties"))){let r=this.properties,n=[...Or(r),...Dr(r)];for(let i of n)this.createProperty(i,r[i])}let e=this[Symbol.metadata];if(e!==null){let r=litPropertyMetadata.get(e);if(r!==void 0)for(let[n,i]of r)this.elementProperties.set(n,i)}this._$Eh=new Map;for(let[r,n]of this.elementProperties){let i=this._$Eu(r,n);i!==void 0&&this._$Eh.set(i,r)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let r=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let i of n)r.unshift(Qe(i))}else e!==void 0&&r.push(Qe(e));return r}static _$Eu(e,r){let n=r.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,r=this.constructor.elementProperties;for(let n of r.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 Lt(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,r,n){this._$AK(e,n)}_$ET(e,r){let n=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,n);if(i!==void 0&&n.reflect===!0){let s=(n.converter?.toAttribute!==void 0?n.converter:et).toAttribute(r,n.type);this._$Em=e,s==null?this.removeAttribute(i):this.setAttribute(i,s),this._$Em=null}}_$AK(e,r){let n=this.constructor,i=n._$Eh.get(e);if(i!==void 0&&this._$Em!==i){let s=n.getPropertyOptions(i),a=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:et;this._$Em=i;let g=a.fromAttribute(r,s.type);this[i]=g??this._$Ej?.get(i)??g,this._$Em=null}}requestUpdate(e,r,n){if(e!==void 0){let i=this.constructor,s=this[e];if(n??(n=i.getPropertyOptions(e)),!((n.hasChanged??It)(s,r)||n.useDefault&&n.reflect&&s===this._$Ej?.get(e)&&!this.hasAttribute(i._$Eu(e,n))))return;this.C(e,r,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,r,{useDefault:n,reflect:i,wrapped:s},a){n&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,a??r??this[e]),s!==!0||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(r=void 0),this._$AL.set(e,r)),i===!0&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(r){Promise.reject(r)}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[i,s]of this._$Ep)this[i]=s;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[i,s]of n){let{wrapped:a}=s,g=this[i];a!==!0||this._$AL.has(i)||g===void 0||this.C(i,void 0,s,g)}}let e=!1,r=this._$AL;try{e=this.shouldUpdate(r),e?(this.willUpdate(r),this._$EO?.forEach((n=>n.hostUpdate?.())),this.update(r)):this._$EM()}catch(n){throw e=!1,this._$EM(),n}e&&this._$AE(r)}willUpdate(e){}_$AE(e){this._$EO?.forEach((r=>r.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((r=>this._$ET(r,this[r])))),this._$EM()}updated(e){}firstUpdated(e){}};N.elementStyles=[],N.shadowRootOptions={mode:"open"},N[Z("elementProperties")]=new Map,N[Z("finalized")]=new Map,Rr?.({ReactiveElement:N}),(V.reactiveElementVersions??(V.reactiveElementVersions=[])).push("2.1.1");var Y=globalThis,be=Y.trustedTypes,Mt=be?be.createPolicy("lit-html",{createHTML:t=>t}):void 0,rt="$lit$",I=`lit$${Math.random().toFixed(9).slice(2)}$`,nt="?"+I,jr=`<${nt}>`,P=document,X=()=>P.createComment(""),Q=t=>t===null||typeof t!="object"&&typeof t!="function",it=Array.isArray,Ut=t=>it(t)||typeof t?.[Symbol.iterator]=="function",tt=`[
|
|
1
|
+
var Ct=!1,Er=["./keys.json","./tekst.json","./tekster.json","./language.json","./languages.json","./translations.json","./translate.json","./i18n.json","./locales.json","./strings.json","./text.json","./texts.json"];function Ar(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 Lr(){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 r=document.querySelector('meta[name="ds-one:translations"]')?.getAttribute("content");if(r)return r;let n=document.querySelector('link[rel="ds-one-translations"]')?.getAttribute("href");return n||null}function Tr(){let t=new Set,e=typeof window<"u"?window.DS_ONE_TRANSLATIONS_FILE:null,r=Lr(),n=i=>{let s=Ar(i??"");s&&t.add(s)};return n(e??null),n(r),Er.forEach(i=>n(i)),Array.from(t)}function Nr(t){return!t||typeof t!="object"?!1:Object.values(t).every(e=>e&&typeof e=="object")}async function Ir(t){try{let e=await fetch(t);if(!e.ok)return null;let r=await e.json();return Nr(r)?Object.keys(r).length===0?(console.warn(`[DS one] No languages found in ${t}`),null):r:(console.warn(`[DS one] Invalid translation format in ${t}. Expected object with language codes as keys.`),null)}catch(e){return e instanceof TypeError&&e.message.includes("Failed to fetch")||console.error(`[DS one] Error loading external translations from ${t}:`,e),null}}async function kt(){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=Tr();for(let e of t){let r=await Ir(e);if(!r)continue;window.DS_ONE_TRANSLATIONS=r;let n=Object.keys(r);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. Looked in: ${t.join(", ")}. Using bundled translations.`),!1}typeof window<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{kt()}):kt());var ve=globalThis,ye=ve.ShadowRoot&&(ve.ShadyCSS===void 0||ve.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Xe=Symbol(),Et=new WeakMap,G=class{constructor(e,r,n){if(this._$cssResult$=!0,n!==Xe)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=r}get styleSheet(){let e=this.o,r=this.t;if(ye&&e===void 0){let n=r!==void 0&&r.length===1;n&&(e=Et.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&Et.set(r,e))}return e}toString(){return this.cssText}},At=t=>new G(typeof t=="string"?t:t+"",void 0,Xe),c=(t,...e)=>{let r=t.length===1?t[0]:e.reduce(((n,i,s)=>n+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1]),t[0]);return new G(r,t,Xe)},Lt=(t,e)=>{if(ye)t.adoptedStyleSheets=e.map((r=>r instanceof CSSStyleSheet?r:r.styleSheet));else for(let r of e){let n=document.createElement("style"),i=ve.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,t.appendChild(n)}},Qe=ye?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(let n of e.cssRules)r+=n.cssText;return At(r)})(t):t;var{is:Mr,defineProperty:Vr,getOwnPropertyDescriptor:Hr,getOwnPropertyNames:Or,getOwnPropertySymbols:Dr,getPrototypeOf:Pr}=Object,V=globalThis,Tt=V.trustedTypes,Ur=Tt?Tt.emptyScript:"",Rr=V.reactiveElementPolyfillSupport,Z=(t,e)=>t,et={toAttribute(t,e){switch(e){case Boolean:t=t?Ur:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=t!==null;break;case Number:r=t===null?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch{r=null}}return r}},It=(t,e)=>!Mr(t,e),Nt={attribute:!0,type:String,converter:et,reflect:!1,useDefault:!1,hasChanged:It};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),V.litPropertyMetadata??(V.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,r=Nt){if(r.state&&(r.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((r=Object.create(r)).wrapped=!0),this.elementProperties.set(e,r),!r.noAccessor){let n=Symbol(),i=this.getPropertyDescriptor(e,n,r);i!==void 0&&Vr(this.prototype,e,i)}}static getPropertyDescriptor(e,r,n){let{get:i,set:s}=Hr(this.prototype,e)??{get(){return this[r]},set(a){this[r]=a}};return{get:i,set(a){let g=i?.call(this);s?.call(this,a),this.requestUpdate(e,g,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Nt}static _$Ei(){if(this.hasOwnProperty(Z("elementProperties")))return;let e=Pr(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Z("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Z("properties"))){let r=this.properties,n=[...Or(r),...Dr(r)];for(let i of n)this.createProperty(i,r[i])}let e=this[Symbol.metadata];if(e!==null){let r=litPropertyMetadata.get(e);if(r!==void 0)for(let[n,i]of r)this.elementProperties.set(n,i)}this._$Eh=new Map;for(let[r,n]of this.elementProperties){let i=this._$Eu(r,n);i!==void 0&&this._$Eh.set(i,r)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let r=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let i of n)r.unshift(Qe(i))}else e!==void 0&&r.push(Qe(e));return r}static _$Eu(e,r){let n=r.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,r=this.constructor.elementProperties;for(let n of r.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 Lt(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,r,n){this._$AK(e,n)}_$ET(e,r){let n=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,n);if(i!==void 0&&n.reflect===!0){let s=(n.converter?.toAttribute!==void 0?n.converter:et).toAttribute(r,n.type);this._$Em=e,s==null?this.removeAttribute(i):this.setAttribute(i,s),this._$Em=null}}_$AK(e,r){let n=this.constructor,i=n._$Eh.get(e);if(i!==void 0&&this._$Em!==i){let s=n.getPropertyOptions(i),a=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:et;this._$Em=i;let g=a.fromAttribute(r,s.type);this[i]=g??this._$Ej?.get(i)??g,this._$Em=null}}requestUpdate(e,r,n){if(e!==void 0){let i=this.constructor,s=this[e];if(n??(n=i.getPropertyOptions(e)),!((n.hasChanged??It)(s,r)||n.useDefault&&n.reflect&&s===this._$Ej?.get(e)&&!this.hasAttribute(i._$Eu(e,n))))return;this.C(e,r,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,r,{useDefault:n,reflect:i,wrapped:s},a){n&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,a??r??this[e]),s!==!0||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(r=void 0),this._$AL.set(e,r)),i===!0&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(r){Promise.reject(r)}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[i,s]of this._$Ep)this[i]=s;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[i,s]of n){let{wrapped:a}=s,g=this[i];a!==!0||this._$AL.has(i)||g===void 0||this.C(i,void 0,s,g)}}let e=!1,r=this._$AL;try{e=this.shouldUpdate(r),e?(this.willUpdate(r),this._$EO?.forEach((n=>n.hostUpdate?.())),this.update(r)):this._$EM()}catch(n){throw e=!1,this._$EM(),n}e&&this._$AE(r)}willUpdate(e){}_$AE(e){this._$EO?.forEach((r=>r.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((r=>this._$ET(r,this[r])))),this._$EM()}updated(e){}firstUpdated(e){}};N.elementStyles=[],N.shadowRootOptions={mode:"open"},N[Z("elementProperties")]=new Map,N[Z("finalized")]=new Map,Rr?.({ReactiveElement:N}),(V.reactiveElementVersions??(V.reactiveElementVersions=[])).push("2.1.1");var Y=globalThis,we=Y.trustedTypes,Mt=we?we.createPolicy("lit-html",{createHTML:t=>t}):void 0,rt="$lit$",I=`lit$${Math.random().toFixed(9).slice(2)}$`,nt="?"+I,jr=`<${nt}>`,P=document,X=()=>P.createComment(""),Q=t=>t===null||typeof t!="object"&&typeof t!="function",it=Array.isArray,Ut=t=>it(t)||typeof t?.[Symbol.iterator]=="function",tt=`[
|
|
2
2
|
\f\r]`,J=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Vt=/-->/g,Ht=/>/g,O=RegExp(`>|${tt}(?:([^\\s"'>=/]+)(${tt}*=${tt}*(?:[^
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ot=/'/g,Dt=/"/g,Rt=/^(?:script|style|textarea|title)$/i,st=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),o=st(1),jt=st(2),Hn=st(3),M=Symbol.for("lit-noChange"),b=Symbol.for("lit-nothing"),Pt=new WeakMap,D=P.createTreeWalker(P,129);function zt(t,e){if(!it(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Mt!==void 0?Mt.createHTML(e):e}var Wt=(t,e)=>{let r=t.length-1,n=[],i,s=e===2?"<svg>":e===3?"<math>":"",a=J;for(let g=0;g<r;g++){let u=t[g],p,v,d=-1,A=0;for(;A<u.length&&(a.lastIndex=A,v=a.exec(u),v!==null);)A=a.lastIndex,a===J?v[1]==="!--"?a=Vt:v[1]!==void 0?a=Ht:v[2]!==void 0?(Rt.test(v[2])&&(i=RegExp("</"+v[2],"g")),a=O):v[3]!==void 0&&(a=O):a===O?v[0]===">"?(a=i??J,d=-1):v[1]===void 0?d=-2:(d=a.lastIndex-v[2].length,p=v[1],a=v[3]===void 0?O:v[3]==='"'?Dt:Ot):a===Dt||a===Ot?a=O:a===Vt||a===Ht?a=J:(a=O,i=void 0);let f=a===O&&t[g+1].startsWith("/>")?" ":"";s+=a===J?u+jr:d>=0?(n.push(p),u.slice(0,d)+rt+u.slice(d)+I+f):u+I+(d===-2?g:f)}return[zt(t,s+(t[r]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]},ee=class t{constructor({strings:e,_$litType$:r},n){let i;this.parts=[];let s=0,a=0,g=e.length-1,u=this.parts,[p,v]=Wt(e,r);if(this.el=t.createElement(p,n),D.currentNode=this.el.content,r===2||r===3){let d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(i=D.nextNode())!==null&&u.length<g;){if(i.nodeType===1){if(i.hasAttributes())for(let d of i.getAttributeNames())if(d.endsWith(rt)){let A=v[a++],f=i.getAttribute(d).split(I),k=/([.?@])?(.*)/.exec(A);u.push({type:1,index:s,name:k[2],strings:f,ctor:k[1]==="."?xe:k[1]==="?"?_e:k[1]==="@"?$e:R}),i.removeAttribute(d)}else d.startsWith(I)&&(u.push({type:6,index:s}),i.removeAttribute(d));if(Rt.test(i.tagName)){let d=i.textContent.split(I),A=d.length-1;if(A>0){i.textContent=be?be.emptyScript:"";for(let f=0;f<A;f++)i.append(d[f],X()),D.nextNode(),u.push({type:2,index:++s});i.append(d[A],X())}}}else if(i.nodeType===8)if(i.data===nt)u.push({type:2,index:s});else{let d=-1;for(;(d=i.data.indexOf(I,d+1))!==-1;)u.push({type:7,index:s}),d+=I.length-1}s++}}static createElement(e,r){let n=P.createElement("template");return n.innerHTML=e,n}};function U(t,e,r=t,n){if(e===M)return e;let i=n!==void 0?r._$Co?.[n]:r._$Cl,s=Q(e)?void 0:e._$litDirective$;return i?.constructor!==s&&(i?._$AO?.(!1),s===void 0?i=void 0:(i=new s(t),i._$AT(t,r,n)),n!==void 0?(r._$Co??(r._$Co=[]))[n]=i:r._$Cl=i),i!==void 0&&(e=U(t,i._$AS(t,e.values),i,n)),e}var we=class{constructor(e,r){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:r},parts:n}=this._$AD,i=(e?.creationScope??P).importNode(r,!0);D.currentNode=i;let s=D.nextNode(),a=0,g=0,u=n[0];for(;u!==void 0;){if(a===u.index){let p;u.type===2?p=new z(s,s.nextSibling,this,e):u.type===1?p=new u.ctor(s,u.name,u.strings,this,e):u.type===6&&(p=new Se(s,this,e)),this._$AV.push(p),u=n[++g]}a!==u?.index&&(s=D.nextNode(),a++)}return D.currentNode=P,i}p(e){let r=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,r),r+=n.strings.length-2):n._$AI(e[r])),r++}},z=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,r,n,i){this.type=2,this._$AH=b,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=n,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,r=this._$AM;return r!==void 0&&e?.nodeType===11&&(e=r.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,r=this){e=U(this,e,r),Q(e)?e===b||e==null||e===""?(this._$AH!==b&&this._$AR(),this._$AH=b):e!==this._$AH&&e!==M&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Ut(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&&Q(this._$AH)?this._$AA.nextSibling.data=e:this.T(P.createTextNode(e)),this._$AH=e}$(e){let{values:r,_$litType$:n}=e,i=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=ee.createElement(zt(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===i)this._$AH.p(r);else{let s=new we(i,this),a=s.u(this.options);s.p(r),this.T(a),this._$AH=s}}_$AC(e){let r=Pt.get(e.strings);return r===void 0&&Pt.set(e.strings,r=new ee(e)),r}k(e){it(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,n,i=0;for(let s of e)i===r.length?r.push(n=new t(this.O(X()),this.O(X()),this,this.options)):n=r[i],n._$AI(s),i++;i<r.length&&(this._$AR(n&&n._$AB.nextSibling,i),r.length=i)}_$AR(e=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);e!==this._$AB;){let n=e.nextSibling;e.remove(),e=n}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},R=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,r,n,i,s){this.type=1,this._$AH=b,this._$AN=void 0,this.element=e,this.name=r,this._$AM=i,this.options=s,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=b}_$AI(e,r=this,n,i){let s=this.strings,a=!1;if(s===void 0)e=U(this,e,r,0),a=!Q(e)||e!==this._$AH&&e!==M,a&&(this._$AH=e);else{let g=e,u,p;for(e=s[0],u=0;u<s.length-1;u++)p=U(this,g[n+u],r,u),p===M&&(p=this._$AH[u]),a||(a=!Q(p)||p!==this._$AH[u]),p===b?e=b:e!==b&&(e+=(p??"")+s[u+1]),this._$AH[u]=p}a&&!i&&this.j(e)}j(e){e===b?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},xe=class extends R{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===b?void 0:e}},_e=class extends R{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==b)}},$e=class extends R{constructor(e,r,n,i,s){super(e,r,n,i,s),this.type=5}_$AI(e,r=this){if((e=U(this,e,r,0)??b)===M)return;let n=this._$AH,i=e===b&&n!==b||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,s=e!==b&&(n===b||i);i&&this.element.removeEventListener(this.name,this,n),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Se=class{constructor(e,r,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){U(this,e)}},Bt={M:rt,P:I,A:nt,C:1,L:Wt,R:we,D:Ut,V:U,I:z,H:R,N:_e,U:$e,B:xe,F:Se},zr=Y.litHtmlPolyfillSupport;zr?.(ee,z),(Y.litHtmlVersions??(Y.litHtmlVersions=[])).push("3.3.1");var qt=(t,e,r)=>{let n=r?.renderBefore??e,i=n._$litPart$;if(i===void 0){let s=r?.renderBefore??null;n._$litPart$=i=new z(e.insertBefore(X(),s),s,void 0,r??{})}return i._$AI(t),i};var te=globalThis,l=class extends N{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var r;let e=super.createRenderRoot();return(r=this.renderOptions).renderBefore??(r.renderBefore=e.firstChild),e}update(e){let r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=qt(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return M}};l._$litElement$=!0,l.finalized=!0,te.litElementHydrateSupport?.({LitElement:l});var Wr=te.litElementPolyfillSupport;Wr?.({LitElement:l});(te.litElementVersions??(te.litElementVersions=[])).push("4.2.1");var Ft={};var Qt=["da","nb","sv","pt","es","zh","ko","ja","en","de"],qr=new Map(Qt.map((t,e)=>[t,e])),Kt={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"},Gt=new Map,Zt=!1;function ke(){return typeof window<"u"&&window.DS_ONE_TRANSLATIONS?window.DS_ONE_TRANSLATIONS:Ft}var T=ke(),ot=new Map,C="en";function re(t){return t?t.toLowerCase().split(/[-_]/)[0]??"":""}function Jt(t){let e=re(t),r=qr.get(e);return typeof r=="number"?r:Qt.length}function er(t){return[...t].sort((e,r)=>{let n=Jt(e),i=Jt(r);return n!==i?n-i:e.localeCompare(r)})}function Fr(t,e){let r=t?.replace("_","-");if(r)try{let n=Gt.get(r);n||(n=new Intl.DisplayNames([r],{type:"language"}),Gt.set(r,n));let i=e.replace("_","-"),s=n.of(i);if(s&&s!==i)return s;let a=n.of(re(i));if(a)return a}catch{Zt||(console.info("[DS one] Intl.DisplayNames is not available, using fallback language names."),Zt=!0)}}function Kr(t){let e=t.toLowerCase().replace("_","-"),r=Kt[e];if(r)return r;let n=re(e);return Kt[n]}function tr(t,e={}){if(!t)return"";let r=[];e.locale&&r.push(e.locale),typeof navigator<"u"&&(Array.isArray(navigator.languages)&&r.push(...navigator.languages),navigator.language&&r.push(navigator.language)),r.push(C),r.push("en");let n=new Set;for(let a of r){if(!a||n.has(a))continue;n.add(a);let g=Fr(a,t);if(g)return g}let i=Kr(t);if(i)return i;let s=re(t);return s?s.toUpperCase():t}var Yt={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 Xt(t){if(!t)return null;let e=t.toLowerCase().replace("_","-"),r=Yt[e];if(r)return r;let n=re(e),i=Yt[n];return i||t}function Gr(){if(typeof navigator>"u")return C;let t=navigator.language;if(t){let e=Xt(t);if(e)return e}if(Array.isArray(navigator.languages))for(let e of navigator.languages){let r=Xt(e);if(r)return r}return C}var Jn=typeof window<"u"?window.localStorage?.getItem("ds-one:language")??void 0:void 0,$={value:localStorage.getItem("language")||Gr(),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"&&window.addEventListener("translations-ready",()=>{T=ke(),window.dispatchEvent(new CustomEvent("translations-loaded")),window.notionDataLoaded=!0;let t=$.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=$.value;window.dispatchEvent(new CustomEvent("language-changed",{detail:{language:t},bubbles:!0,composed:!0}))},100);function E(t){let e=$.value;return T?.[e]?.[t]?T[e][t]:e!==C&&T?.[C]?.[t]?T[C][t]:(console.warn(`[translate] No translation found for key "${t}"`),t)}function Yn(t,e=$.value){if(!t)return!1;let r=T?.[e];return!!(r&&Object.prototype.hasOwnProperty.call(r,t)||e!==C&&T?.[C]&&Object.prototype.hasOwnProperty.call(T[C],t))}function x(t){return E(t)}async function rr(t,e=$.value){if(!t||!T||!T[e])return null;let r=T[e][t];return r||(e!==C&&T[C]?.[t]?T[C][t]:null)}function Xn(t,e,r=$.value){if(!t)return;Zr(r).set(t,e)}function Zr(t){return ot.has(t)||ot.set(t,new Map),ot.get(t)}function Qn(){let t=ke();if(t&&Object.keys(t).length>0){let e=Object.keys(t);return Promise.resolve(er(e))}return Promise.resolve([C])}function at(){let t=ke();return t&&Object.keys(t).length>0?er(Object.keys(t)):[C]}function ei(t,e){console.log(`Loading additional translations for ${t}:`,Object.keys(e).length,"keys")}function lt(t){localStorage.setItem("language",t),$.set(t),window.dispatchEvent(new CustomEvent("language-changed",{detail:{language:t},bubbles:!0,composed:!0}))}var ne=class extends l{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=x(this.key):this._notionText=this.defaultText||this.fallback||null,this.requestUpdate()}render(){return o`
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ot=/'/g,Dt=/"/g,Rt=/^(?:script|style|textarea|title)$/i,st=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),o=st(1),jt=st(2),Hn=st(3),M=Symbol.for("lit-noChange"),w=Symbol.for("lit-nothing"),Pt=new WeakMap,D=P.createTreeWalker(P,129);function zt(t,e){if(!it(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Mt!==void 0?Mt.createHTML(e):e}var Wt=(t,e)=>{let r=t.length-1,n=[],i,s=e===2?"<svg>":e===3?"<math>":"",a=J;for(let g=0;g<r;g++){let u=t[g],p,v,d=-1,A=0;for(;A<u.length&&(a.lastIndex=A,v=a.exec(u),v!==null);)A=a.lastIndex,a===J?v[1]==="!--"?a=Vt:v[1]!==void 0?a=Ht:v[2]!==void 0?(Rt.test(v[2])&&(i=RegExp("</"+v[2],"g")),a=O):v[3]!==void 0&&(a=O):a===O?v[0]===">"?(a=i??J,d=-1):v[1]===void 0?d=-2:(d=a.lastIndex-v[2].length,p=v[1],a=v[3]===void 0?O:v[3]==='"'?Dt:Ot):a===Dt||a===Ot?a=O:a===Vt||a===Ht?a=J:(a=O,i=void 0);let f=a===O&&t[g+1].startsWith("/>")?" ":"";s+=a===J?u+jr:d>=0?(n.push(p),u.slice(0,d)+rt+u.slice(d)+I+f):u+I+(d===-2?g:f)}return[zt(t,s+(t[r]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]},ee=class t{constructor({strings:e,_$litType$:r},n){let i;this.parts=[];let s=0,a=0,g=e.length-1,u=this.parts,[p,v]=Wt(e,r);if(this.el=t.createElement(p,n),D.currentNode=this.el.content,r===2||r===3){let d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(i=D.nextNode())!==null&&u.length<g;){if(i.nodeType===1){if(i.hasAttributes())for(let d of i.getAttributeNames())if(d.endsWith(rt)){let A=v[a++],f=i.getAttribute(d).split(I),C=/([.?@])?(.*)/.exec(A);u.push({type:1,index:s,name:C[2],strings:f,ctor:C[1]==="."?xe:C[1]==="?"?_e:C[1]==="@"?$e:R}),i.removeAttribute(d)}else d.startsWith(I)&&(u.push({type:6,index:s}),i.removeAttribute(d));if(Rt.test(i.tagName)){let d=i.textContent.split(I),A=d.length-1;if(A>0){i.textContent=we?we.emptyScript:"";for(let f=0;f<A;f++)i.append(d[f],X()),D.nextNode(),u.push({type:2,index:++s});i.append(d[A],X())}}}else if(i.nodeType===8)if(i.data===nt)u.push({type:2,index:s});else{let d=-1;for(;(d=i.data.indexOf(I,d+1))!==-1;)u.push({type:7,index:s}),d+=I.length-1}s++}}static createElement(e,r){let n=P.createElement("template");return n.innerHTML=e,n}};function U(t,e,r=t,n){if(e===M)return e;let i=n!==void 0?r._$Co?.[n]:r._$Cl,s=Q(e)?void 0:e._$litDirective$;return i?.constructor!==s&&(i?._$AO?.(!1),s===void 0?i=void 0:(i=new s(t),i._$AT(t,r,n)),n!==void 0?(r._$Co??(r._$Co=[]))[n]=i:r._$Cl=i),i!==void 0&&(e=U(t,i._$AS(t,e.values),i,n)),e}var be=class{constructor(e,r){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:r},parts:n}=this._$AD,i=(e?.creationScope??P).importNode(r,!0);D.currentNode=i;let s=D.nextNode(),a=0,g=0,u=n[0];for(;u!==void 0;){if(a===u.index){let p;u.type===2?p=new z(s,s.nextSibling,this,e):u.type===1?p=new u.ctor(s,u.name,u.strings,this,e):u.type===6&&(p=new Se(s,this,e)),this._$AV.push(p),u=n[++g]}a!==u?.index&&(s=D.nextNode(),a++)}return D.currentNode=P,i}p(e){let r=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,r),r+=n.strings.length-2):n._$AI(e[r])),r++}},z=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,r,n,i){this.type=2,this._$AH=w,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=n,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,r=this._$AM;return r!==void 0&&e?.nodeType===11&&(e=r.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,r=this){e=U(this,e,r),Q(e)?e===w||e==null||e===""?(this._$AH!==w&&this._$AR(),this._$AH=w):e!==this._$AH&&e!==M&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Ut(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!==w&&Q(this._$AH)?this._$AA.nextSibling.data=e:this.T(P.createTextNode(e)),this._$AH=e}$(e){let{values:r,_$litType$:n}=e,i=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=ee.createElement(zt(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===i)this._$AH.p(r);else{let s=new be(i,this),a=s.u(this.options);s.p(r),this.T(a),this._$AH=s}}_$AC(e){let r=Pt.get(e.strings);return r===void 0&&Pt.set(e.strings,r=new ee(e)),r}k(e){it(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,n,i=0;for(let s of e)i===r.length?r.push(n=new t(this.O(X()),this.O(X()),this,this.options)):n=r[i],n._$AI(s),i++;i<r.length&&(this._$AR(n&&n._$AB.nextSibling,i),r.length=i)}_$AR(e=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);e!==this._$AB;){let n=e.nextSibling;e.remove(),e=n}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},R=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,r,n,i,s){this.type=1,this._$AH=w,this._$AN=void 0,this.element=e,this.name=r,this._$AM=i,this.options=s,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=w}_$AI(e,r=this,n,i){let s=this.strings,a=!1;if(s===void 0)e=U(this,e,r,0),a=!Q(e)||e!==this._$AH&&e!==M,a&&(this._$AH=e);else{let g=e,u,p;for(e=s[0],u=0;u<s.length-1;u++)p=U(this,g[n+u],r,u),p===M&&(p=this._$AH[u]),a||(a=!Q(p)||p!==this._$AH[u]),p===w?e=w:e!==w&&(e+=(p??"")+s[u+1]),this._$AH[u]=p}a&&!i&&this.j(e)}j(e){e===w?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},xe=class extends R{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===w?void 0:e}},_e=class extends R{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==w)}},$e=class extends R{constructor(e,r,n,i,s){super(e,r,n,i,s),this.type=5}_$AI(e,r=this){if((e=U(this,e,r,0)??w)===M)return;let n=this._$AH,i=e===w&&n!==w||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,s=e!==w&&(n===w||i);i&&this.element.removeEventListener(this.name,this,n),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Se=class{constructor(e,r,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){U(this,e)}},Bt={M:rt,P:I,A:nt,C:1,L:Wt,R:be,D:Ut,V:U,I:z,H:R,N:_e,U:$e,B:xe,F:Se},zr=Y.litHtmlPolyfillSupport;zr?.(ee,z),(Y.litHtmlVersions??(Y.litHtmlVersions=[])).push("3.3.1");var qt=(t,e,r)=>{let n=r?.renderBefore??e,i=n._$litPart$;if(i===void 0){let s=r?.renderBefore??null;n._$litPart$=i=new z(e.insertBefore(X(),s),s,void 0,r??{})}return i._$AI(t),i};var te=globalThis,l=class extends N{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var r;let e=super.createRenderRoot();return(r=this.renderOptions).renderBefore??(r.renderBefore=e.firstChild),e}update(e){let r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=qt(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return M}};l._$litElement$=!0,l.finalized=!0,te.litElementHydrateSupport?.({LitElement:l});var Wr=te.litElementPolyfillSupport;Wr?.({LitElement:l});(te.litElementVersions??(te.litElementVersions=[])).push("4.2.1");var Ft={};var Qt=["da","nb","sv","pt","es","zh","ko","ja","en","de"],qr=new Map(Qt.map((t,e)=>[t,e])),Kt={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"},Gt=new Map,Zt=!1;function Ce(){return typeof window<"u"&&window.DS_ONE_TRANSLATIONS?window.DS_ONE_TRANSLATIONS:Ft}var T=Ce(),ot=new Map,k="en";function re(t){return t?t.toLowerCase().split(/[-_]/)[0]??"":""}function Jt(t){let e=re(t),r=qr.get(e);return typeof r=="number"?r:Qt.length}function er(t){return[...t].sort((e,r)=>{let n=Jt(e),i=Jt(r);return n!==i?n-i:e.localeCompare(r)})}function Fr(t,e){let r=t?.replace("_","-");if(r)try{let n=Gt.get(r);n||(n=new Intl.DisplayNames([r],{type:"language"}),Gt.set(r,n));let i=e.replace("_","-"),s=n.of(i);if(s&&s!==i)return s;let a=n.of(re(i));if(a)return a}catch{Zt||(console.info("[DS one] Intl.DisplayNames is not available, using fallback language names."),Zt=!0)}}function Kr(t){let e=t.toLowerCase().replace("_","-"),r=Kt[e];if(r)return r;let n=re(e);return Kt[n]}function tr(t,e={}){if(!t)return"";let r=[];e.locale&&r.push(e.locale),typeof navigator<"u"&&(Array.isArray(navigator.languages)&&r.push(...navigator.languages),navigator.language&&r.push(navigator.language)),r.push(k),r.push("en");let n=new Set;for(let a of r){if(!a||n.has(a))continue;n.add(a);let g=Fr(a,t);if(g)return g}let i=Kr(t);if(i)return i;let s=re(t);return s?s.toUpperCase():t}var Yt={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 Xt(t){if(!t)return null;let e=t.toLowerCase().replace("_","-"),r=Yt[e];if(r)return r;let n=re(e),i=Yt[n];return i||t}function Gr(){if(typeof navigator>"u")return k;let t=navigator.language;if(t){let e=Xt(t);if(e)return e}if(Array.isArray(navigator.languages))for(let e of navigator.languages){let r=Xt(e);if(r)return r}return k}var Jn=typeof window<"u"?window.localStorage?.getItem("ds-one:language")??void 0:void 0,$={value:localStorage.getItem("language")||Gr(),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"&&window.addEventListener("translations-ready",()=>{T=Ce(),window.dispatchEvent(new CustomEvent("translations-loaded")),window.notionDataLoaded=!0;let t=$.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=$.value;window.dispatchEvent(new CustomEvent("language-changed",{detail:{language:t},bubbles:!0,composed:!0}))},100);function E(t){let e=$.value;return T?.[e]?.[t]?T[e][t]:e!==k&&T?.[k]?.[t]?T[k][t]:(console.warn(`[translate] No translation found for key "${t}"`),t)}function Yn(t,e=$.value){if(!t)return!1;let r=T?.[e];return!!(r&&Object.prototype.hasOwnProperty.call(r,t)||e!==k&&T?.[k]&&Object.prototype.hasOwnProperty.call(T[k],t))}function x(t){return E(t)}async function rr(t,e=$.value){if(!t||!T||!T[e])return null;let r=T[e][t];return r||(e!==k&&T[k]?.[t]?T[k][t]:null)}function Xn(t,e,r=$.value){if(!t)return;Zr(r).set(t,e)}function Zr(t){return ot.has(t)||ot.set(t,new Map),ot.get(t)}function Qn(){let t=Ce();if(t&&Object.keys(t).length>0){let e=Object.keys(t);return Promise.resolve(er(e))}return Promise.resolve([k])}function at(){let t=Ce();return t&&Object.keys(t).length>0?er(Object.keys(t)):[k]}function ei(t,e){console.log(`Loading additional translations for ${t}:`,Object.keys(e).length,"keys")}function lt(t){localStorage.setItem("language",t),$.set(t),window.dispatchEvent(new CustomEvent("language-changed",{detail:{language:t},bubbles:!0,composed:!0}))}var ne=class extends l{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=x(this.key):this._notionText=this.defaultText||this.fallback||null,this.requestUpdate()}render(){return o`
|
|
4
4
|
<button
|
|
5
5
|
class=${this.variant}
|
|
6
6
|
?disabled=${this.disabled}
|
|
@@ -60,7 +60,7 @@ var kt=!1,Er=["./keys.json","./tekst.json","./tekster.json","./language.json",".
|
|
|
60
60
|
.loading {
|
|
61
61
|
opacity: 0.7;
|
|
62
62
|
}
|
|
63
|
-
`;customElements.define("ds-button",ne);var
|
|
63
|
+
`;customElements.define("ds-button",ne);var ke=class extends l{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=x(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 o`<span>${this._text||this.defaultValue||this.key}</span>`}};ke.styles=c`
|
|
64
64
|
:host {
|
|
65
65
|
display: inline;
|
|
66
66
|
}
|
|
@@ -68,7 +68,7 @@ var kt=!1,Er=["./keys.json","./tekst.json","./tekster.json","./language.json",".
|
|
|
68
68
|
.loading {
|
|
69
69
|
opacity: 0.6;
|
|
70
70
|
}
|
|
71
|
-
`;customElements.define("text
|
|
71
|
+
`;customElements.define("ds-text",ke);var Ee={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},ie=t=>(...e)=>({_$litDirective$:t,values:e}),W=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,r,n){this._$Ct=e,this._$AM=r,this._$Ci=n}_$AS(e,r){return this.update(e,r)}update(e,r){return this.render(...r)}};var se=class extends W{constructor(e){if(super(e),this.it=w,e.type!==Ee.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===w||e==null)return this._t=void 0,this.it=e;if(e===M)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 r=[e];return r.raw=r,this._t={_$litType$:this.constructor.resultType,strings:r,values:[]}}};se.directiveName="unsafeHTML",se.resultType=1;var nr=ie(se);var B=class t extends l{get type(){return this._type}set type(e){let r=this._type;this._type=e,this.requestUpdate("type",r)}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"),o`<div class="icon-container"><slot></slot></div>`;let e=t.iconNameToSvgMap[this._type.toLowerCase()];if(e)return o`<div class="icon-container">${nr(e)}</div>`;switch(this._type.toLowerCase()){case"close":return console.log("Rendering close icon"),o`
|
|
72
72
|
<div class="icon-container">
|
|
73
73
|
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
74
74
|
<path
|
|
@@ -281,7 +281,7 @@ var kt=!1,Er=["./keys.json","./tekst.json","./tekster.json","./language.json",".
|
|
|
281
281
|
display: inline-block;
|
|
282
282
|
vertical-align: middle;
|
|
283
283
|
}
|
|
284
|
-
`;customElements.define("link-v1",Ae);var Jr=Object.defineProperty,Yr=(t,e,r)=>e in t?Jr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ct=(t,e,r)=>(Yr(t,typeof e!="symbol"?e+"":e,r),r),Xr=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},dt=(t,e)=>{if(Object(e)!==e)throw TypeError('Cannot use the "in" operator on this value');return t.has(e)},Le=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},ir=(t,e,r)=>(Xr(t,e,"access private method"),r);function sr(t,e){return Object.is(t,e)}var w=null,oe=!1,Te=1,Ne=Symbol("SIGNAL");function q(t){let e=w;return w=t,e}function Qr(){return w}function en(){return oe}var ft={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 Ie(t){if(oe)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(F(w),e<w.producerNode.length&&w.producerNode[e]!==t&&pt(w)){let r=w.producerNode[e];Me(r,w.producerIndexOfThis[e])}w.producerNode[e]!==t&&(w.producerNode[e]=t,w.producerIndexOfThis[e]=pt(w)?lr(t,w,e):0),w.producerLastReadVersion[e]=t.version}function tn(){Te++}function or(t){if(!(!t.dirty&&t.lastCleanEpoch===Te)){if(!t.producerMustRecompute(t)&&!an(t)){t.dirty=!1,t.lastCleanEpoch=Te;return}t.producerRecomputeValue(t),t.dirty=!1,t.lastCleanEpoch=Te}}function ar(t){if(t.liveConsumerNode===void 0)return;let e=oe;oe=!0;try{for(let r of t.liveConsumerNode)r.dirty||nn(r)}finally{oe=e}}function rn(){return w?.consumerAllowSignalWrites!==!1}function nn(t){var e;t.dirty=!0,ar(t),(e=t.consumerMarkedDirty)==null||e.call(t.wrapper??t)}function sn(t){return t&&(t.nextProducerIndex=0),q(t)}function on(t,e){if(q(e),!(!t||t.producerNode===void 0||t.producerIndexOfThis===void 0||t.producerLastReadVersion===void 0)){if(pt(t))for(let r=t.nextProducerIndex;r<t.producerNode.length;r++)Me(t.producerNode[r],t.producerIndexOfThis[r]);for(;t.producerNode.length>t.nextProducerIndex;)t.producerNode.pop(),t.producerLastReadVersion.pop(),t.producerIndexOfThis.pop()}}function an(t){F(t);for(let e=0;e<t.producerNode.length;e++){let r=t.producerNode[e],n=t.producerLastReadVersion[e];if(n!==r.version||(or(r),n!==r.version))return!0}return!1}function lr(t,e,r){var n;if(mt(t),F(t),t.liveConsumerNode.length===0){(n=t.watched)==null||n.call(t.wrapper);for(let i=0;i<t.producerNode.length;i++)t.producerIndexOfThis[i]=lr(t.producerNode[i],t,i)}return t.liveConsumerIndexOfThis.push(r),t.liveConsumerNode.push(e)-1}function Me(t,e){var r;if(mt(t),F(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){(r=t.unwatched)==null||r.call(t.wrapper);for(let i=0;i<t.producerNode.length;i++)Me(t.producerNode[i],t.producerIndexOfThis[i])}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 i=t.liveConsumerIndexOfThis[e],s=t.liveConsumerNode[e];F(s),s.producerIndexOfThis[i]=e}}function pt(t){var e;return t.consumerIsAlwaysLive||(((e=t?.liveConsumerNode)==null?void 0:e.length)??0)>0}function F(t){t.producerNode??(t.producerNode=[]),t.producerIndexOfThis??(t.producerIndexOfThis=[]),t.producerLastReadVersion??(t.producerLastReadVersion=[])}function mt(t){t.liveConsumerNode??(t.liveConsumerNode=[]),t.liveConsumerIndexOfThis??(t.liveConsumerIndexOfThis=[])}function cr(t){if(or(t),Ie(t),t.value===gt)throw t.error;return t.value}function ln(t){let e=Object.create(cn);e.computation=t;let r=()=>cr(e);return r[Ne]=e,r}var ht=Symbol("UNSET"),ut=Symbol("COMPUTING"),gt=Symbol("ERRORED"),cn={...ft,value:ht,dirty:!0,error:null,equal:sr,producerMustRecompute(t){return t.value===ht||t.value===ut},producerRecomputeValue(t){if(t.value===ut)throw new Error("Detected cycle in computations.");let e=t.value;t.value=ut;let r=sn(t),n,i=!1;try{n=t.computation.call(t.wrapper),i=e!==ht&&e!==gt&&t.equal.call(t.wrapper,e,n)}catch(s){n=gt,t.error=s}finally{on(t,r)}if(i){t.value=e;return}t.value=n,t.version++}};function dn(){throw new Error}var hn=dn;function un(){hn()}function pn(t){let e=Object.create(mn);e.value=t;let r=()=>(Ie(e),e.value);return r[Ne]=e,r}function gn(){return Ie(this),this.value}function fn(t,e){rn()||un(),t.equal.call(t.wrapper,t.value,e)||(t.value=e,vn(t))}var mn={...ft,equal:sr,value:void 0};function vn(t){t.version++,tn(),ar(t)}var _=Symbol("node"),S;(t=>{var e,r,n,i,s,a;class g{constructor(v,d={}){Le(this,r),ct(this,e);let f=pn(v)[Ne];if(this[_]=f,f.wrapper=this,d){let k=d.equals;k&&(f.equal=k),f.watched=d[t.subtle.watched],f.unwatched=d[t.subtle.unwatched]}}get(){if(!(0,t.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.get");return gn.call(this[_])}set(v){if(!(0,t.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.set");if(en())throw new Error("Writes to signals not permitted during Watcher callback");let d=this[_];fn(d,v)}}e=_,r=new WeakSet,n=function(){},t.isState=p=>typeof p=="object"&&dt(r,p),t.State=g;class u{constructor(v,d){Le(this,s),ct(this,i);let f=ln(v)[Ne];if(f.consumerAllowSignalWrites=!0,this[_]=f,f.wrapper=this,d){let k=d.equals;k&&(f.equal=k),f.watched=d[t.subtle.watched],f.unwatched=d[t.subtle.unwatched]}}get(){if(!(0,t.isComputed)(this))throw new TypeError("Wrong receiver type for Signal.Computed.prototype.get");return cr(this[_])}}i=_,s=new WeakSet,a=function(){},t.isComputed=p=>typeof p=="object"&&dt(s,p),t.Computed=u,(p=>{var v,d,A,f,k;function br(y){let m,h=null;try{h=q(null),m=y()}finally{q(h)}return m}p.untrack=br;function wr(y){var m;if(!(0,t.isComputed)(y)&&!(0,t.isWatcher)(y))throw new TypeError("Called introspectSources without a Computed or Watcher argument");return((m=y[_].producerNode)==null?void 0:m.map(h=>h.wrapper))??[]}p.introspectSources=wr;function xr(y){var m;if(!(0,t.isComputed)(y)&&!(0,t.isState)(y))throw new TypeError("Called introspectSinks without a Signal argument");return((m=y[_].liveConsumerNode)==null?void 0:m.map(h=>h.wrapper))??[]}p.introspectSinks=xr;function _r(y){if(!(0,t.isComputed)(y)&&!(0,t.isState)(y))throw new TypeError("Called hasSinks without a Signal argument");let m=y[_].liveConsumerNode;return m?m.length>0:!1}p.hasSinks=_r;function $r(y){if(!(0,t.isComputed)(y)&&!(0,t.isWatcher)(y))throw new TypeError("Called hasSources without a Computed or Watcher argument");let m=y[_].producerNode;return m?m.length>0:!1}p.hasSources=$r;class Sr{constructor(m){Le(this,d),Le(this,f),ct(this,v);let h=Object.create(ft);h.wrapper=this,h.consumerMarkedDirty=m,h.consumerIsAlwaysLive=!0,h.consumerAllowSignalWrites=!1,h.producerNode=[],this[_]=h}watch(...m){if(!(0,t.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");ir(this,f,k).call(this,m);let h=this[_];h.dirty=!1;let L=q(h);for(let me of m)Ie(me[_]);q(L)}unwatch(...m){if(!(0,t.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");ir(this,f,k).call(this,m);let h=this[_];F(h);for(let L=h.producerNode.length-1;L>=0;L--)if(m.includes(h.producerNode[L].wrapper)){Me(h.producerNode[L],h.producerIndexOfThis[L]);let me=h.producerNode.length-1;if(h.producerNode[L]=h.producerNode[me],h.producerIndexOfThis[L]=h.producerIndexOfThis[me],h.producerNode.length--,h.producerIndexOfThis.length--,h.nextProducerIndex--,L<h.producerNode.length){let Cr=h.producerIndexOfThis[L],St=h.producerNode[L];mt(St),St.liveConsumerIndexOfThis[Cr]=L}}}getPending(){if(!(0,t.isWatcher)(this))throw new TypeError("Called getPending without Watcher receiver");return this[_].producerNode.filter(h=>h.dirty).map(h=>h.wrapper)}}v=_,d=new WeakSet,A=function(){},f=new WeakSet,k=function(y){for(let m of y)if(!(0,t.isComputed)(m)&&!(0,t.isState)(m))throw new TypeError("Called watch/unwatch without a Computed or State argument")},t.isWatcher=y=>dt(d,y),p.Watcher=Sr;function kr(){var y;return(y=Qr())==null?void 0:y.wrapper}p.currentComputed=kr,p.watched=Symbol("watched"),p.unwatched=Symbol("unwatched")})(t.subtle||(t.subtle={}))})(S||(S={}));var _i=Symbol("SignalWatcherBrand"),$i=new FinalizationRegistry((({watcher:t,signal:e})=>{t.unwatch(e)}));var{I:Ai}=Bt;var dr=t=>t.strings===void 0;var ae=(t,e)=>{let r=t._$AN;if(r===void 0)return!1;for(let n of r)n._$AO?.(e,!1),ae(n,e);return!0},Ve=t=>{let e,r;do{if((e=t._$AM)===void 0)break;r=e._$AN,r.delete(t),t=e}while(r?.size===0)},hr=t=>{for(let e;e=t._$AM;t=e){let r=e._$AN;if(r===void 0)e._$AN=r=new Set;else if(r.has(t))break;r.add(t),wn(e)}};function yn(t){this._$AN!==void 0?(Ve(this),this._$AM=t,hr(this)):this._$AM=t}function bn(t,e=!1,r=0){let n=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(e)if(Array.isArray(n))for(let s=r;s<n.length;s++)ae(n[s],!1),Ve(n[s]);else n!=null&&(ae(n,!1),Ve(n));else ae(this,t)}var wn=t=>{t.type==Ee.CHILD&&(t._$AP??(t._$AP=bn),t._$AQ??(t._$AQ=yn))},He=class extends W{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,r,n){super._$AT(e,r,n),hr(this),this.isConnected=e._$AU}_$AO(e,r=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),r&&(ae(this,e),Ve(this))}setValue(e){if(dr(this._$Ct))this._$Ct._$AI(e,this);else{let r=[...this._$Ct._$AH];r[this._$Ci]=e,this._$Ct._$AI(r,this,0)}}disconnected(){}reconnected(){}};var Oe=class extends He{_$Sl(){if(this._$Su!==void 0)return;this._$SW=new S.Computed((()=>{var r;return(r=this._$Sj)===null||r===void 0?void 0:r.get()}));let e=this._$Su=new S.subtle.Watcher((()=>{var r;(r=this._$SO)===null||r===void 0||r._(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(S.subtle.untrack((()=>{var e;return(e=this._$SW)===null||e===void 0?void 0:e.get()})))}render(e){return S.subtle.untrack((()=>e.get()))}update(e,[r]){var n,i;return(n=this._$SO)!==null&&n!==void 0||(this._$SO=(i=e.options)===null||i===void 0?void 0:i.host),r!==this._$Sj&&this._$Sj!==void 0&&this._$Sp(),this._$Sj=r,this._$Sl(),S.subtle.untrack((()=>this._$SW.get()))}disconnected(){this._$Sp()}reconnected(){this._$Sl()}},vt=ie(Oe);var yt=t=>(e,...r)=>t(e,...r.map((n=>n instanceof S.State||n instanceof S.Computed?vt(n):n))),xn=yt(o),_n=yt(jt);var Gi=S.State,Zi=S.Computed,ur=(t,e)=>new S.State(t,e);function $n(){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 H=ur($n());function De(t){if(t!==H.get()&&(H.set(t),typeof window<"u")){try{window.localStorage?.setItem("ds-one:theme",t)}catch(r){console.warn("ds-one: unable to persist theme preference",r)}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=H.get(),e=window.document?.documentElement;e&&(e.classList.remove("light-theme","dark-theme"),e.classList.add(`${t}-theme`))}function j(t){if(!(typeof window>"u"))try{let e=window.localStorage?.getItem("ds-one:settings"),n={...e?JSON.parse(e):{},...t};window.localStorage?.setItem("ds-one:settings",JSON.stringify(n))}catch(e){console.warn("ds-one: unable to persist settings",e)}}var Sn=t=>{localStorage.setItem("accentColor",t)},wt=()=>localStorage.getItem("accentColor")||"--blue",bt=()=>{let t=wt();document.documentElement.style.setProperty("--accent-color",`var(${t})`)},kn=t=>{localStorage.setItem("notesStyleMedium",t)},pr=()=>localStorage.getItem("notesStyleMedium")||"note",gr=t=>{localStorage.setItem("pageStyle",t)},le=()=>localStorage.getItem("pageStyle")||"note",Pe=class extends l{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=at();this.values=e,this.currentValue=$.value,this.label=this.getLabel()}else if(this.type==="theme"){this.values=["light","dark"];let e=H.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=wt();this.currentValue=e,bt(),this.label=this.getLabel()}else if(this.type==="notes-style-medium"){this.values=["default","big","gallery"];let e=pr();this.currentValue=e;let r=le();this.disabled=r==="note",this.label=this.getLabel()}else if(this.type==="page-style"){this.values=["note","page"];let e=le();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,r,n){super.attributeChangedCallback(e,r,n),e==="type"&&r!==n&&this.initializeValues()}async setupInitialValue(){if(this.type==="language"){let e=$.value;this.currentValue=e,this.label=this.getLabel()}else if(this.type==="theme"){let e=H.get();this.currentValue=e,this.label=this.getLabel()}else if(this.type==="accent-color"){let e=wt();this.currentValue=e,bt(),this.label=this.getLabel()}else if(this.type==="notes-style-medium"){let e=pr();this.currentValue=e;let r=le();this.disabled=r==="note",this.label=this.getLabel()}else if(this.type==="page-style"){let e=le();this.currentValue=e,this.label=this.getLabel()}else if(this.type==="icon-only"){let e=le();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,i=this.values[n];this.currentValue=i,document.startViewTransition?document.startViewTransition(()=>{lt(i)}):lt(i),j({language:i}),window.dispatchEvent(new CustomEvent("language-changed",{detail:{language:i}}))}else if(this.type==="theme"){let n=(this.values.indexOf(this.currentValue)+1)%this.values.length,i=this.values[n];this.currentValue=i,De(i),j({theme:i})}else if(this.type==="accent-color"){let n=(this.values.indexOf(this.currentValue)+1)%this.values.length,i=this.values[n];this.currentValue=i,Sn(i),bt(),j({accentColor:i}),window.dispatchEvent(new CustomEvent("accent-color-changed",{detail:{color:i}}))}else if(this.type==="notes-style-medium"){let n=(this.values.indexOf(this.currentValue)+1)%this.values.length,i=this.values[n];this.currentValue=i,kn(i),j({notesStyleMedium:i}),window.dispatchEvent(new CustomEvent("notes-style-medium-changed",{detail:{style:i}}))}else if(this.type==="page-style"){let n=(this.values.indexOf(this.currentValue)+1)%this.values.length,i=this.values[n];this.currentValue=i,gr(i),j({pageStyle:i}),window.dispatchEvent(new CustomEvent("page-style-changed",{detail:{behavior:i}}))}else if(this.type==="icon-only"){let n=(this.values.indexOf(this.currentValue)+1)%this.values.length,i=this.values[n];this.currentValue=i,gr(i),j({pageStyle:i}),this.label="",window.dispatchEvent(new CustomEvent("page-style-changed",{detail:{behavior:i}}))}this.label=this.getLabel(),this.requestUpdate()}}getValueDisplay(e){if(this.type==="language")return tr(e,{locale:$.value});if(this.type==="theme"){if(this.translationsReady){let r=E(`themes.${e}`);if(r&&r!==`themes.${e}`)return r}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 r=E(e==="note"?"note":"page");if(r&&r!==(e==="note"?"note":"page"))return r}return e}else if(this.type==="icon-only")return e==="note"?o`<icon-v1 type="note"></icon-v1>`:e==="page"?o`<icon-v1 type="page"></icon-v1>`:o`<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 i=E(n);if(i&&i!==n)return i}return e.replace("--","").replace("-"," ")}getNotesStyleIcon(e){return e==="page"?o`<icon-v1 type="page"></icon-v1>`:e==="note"?o`<icon-v1 type="note"></icon-v1>`:e==="default"?o`<icon-v1 type="default"></icon-v1>`:e==="big"?o`<icon-v1 type="big"></icon-v1>`:e==="gallery"?o`<icon-v1 type="gallery"></icon-v1>`:o`<span>${e}</span>`}getLabel(){if(this.type==="language"){if(this.translationsReady){let e=E("language");if(e&&e!=="language")return e}return"Language"}else if(this.type==="theme"){if(this.translationsReady){let e=E("theme");if(e&&e!=="theme")return e}return"Theme"}else if(this.type==="accent-color"){if(this.translationsReady){let e=E("accentColor");if(e&&e!=="accentColor")return e}return"Accent Color"}else if(this.type==="notes-style-medium"){if(this.translationsReady){let e=E("notesStyle");if(e&&e!=="notesStyle")return e}return"Notes Style"}else if(this.type==="page-style"){if(this.translationsReady){let e=E("clickingItem");if(e&&e!=="clickingItem")return e}return"Clic"}else if(this.type==="icon-only")return"";return this.label}render(){return o`
|
|
284
|
+
`;customElements.define("link-v1",Ae);var Jr=Object.defineProperty,Yr=(t,e,r)=>e in t?Jr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ct=(t,e,r)=>(Yr(t,typeof e!="symbol"?e+"":e,r),r),Xr=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},dt=(t,e)=>{if(Object(e)!==e)throw TypeError('Cannot use the "in" operator on this value');return t.has(e)},Le=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},ir=(t,e,r)=>(Xr(t,e,"access private method"),r);function sr(t,e){return Object.is(t,e)}var b=null,oe=!1,Te=1,Ne=Symbol("SIGNAL");function q(t){let e=b;return b=t,e}function Qr(){return b}function en(){return oe}var ft={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 Ie(t){if(oe)throw new Error(typeof ngDevMode<"u"&&ngDevMode?"Assertion error: signal read during notification phase":"");if(b===null)return;b.consumerOnSignalRead(t);let e=b.nextProducerIndex++;if(F(b),e<b.producerNode.length&&b.producerNode[e]!==t&&pt(b)){let r=b.producerNode[e];Me(r,b.producerIndexOfThis[e])}b.producerNode[e]!==t&&(b.producerNode[e]=t,b.producerIndexOfThis[e]=pt(b)?lr(t,b,e):0),b.producerLastReadVersion[e]=t.version}function tn(){Te++}function or(t){if(!(!t.dirty&&t.lastCleanEpoch===Te)){if(!t.producerMustRecompute(t)&&!an(t)){t.dirty=!1,t.lastCleanEpoch=Te;return}t.producerRecomputeValue(t),t.dirty=!1,t.lastCleanEpoch=Te}}function ar(t){if(t.liveConsumerNode===void 0)return;let e=oe;oe=!0;try{for(let r of t.liveConsumerNode)r.dirty||nn(r)}finally{oe=e}}function rn(){return b?.consumerAllowSignalWrites!==!1}function nn(t){var e;t.dirty=!0,ar(t),(e=t.consumerMarkedDirty)==null||e.call(t.wrapper??t)}function sn(t){return t&&(t.nextProducerIndex=0),q(t)}function on(t,e){if(q(e),!(!t||t.producerNode===void 0||t.producerIndexOfThis===void 0||t.producerLastReadVersion===void 0)){if(pt(t))for(let r=t.nextProducerIndex;r<t.producerNode.length;r++)Me(t.producerNode[r],t.producerIndexOfThis[r]);for(;t.producerNode.length>t.nextProducerIndex;)t.producerNode.pop(),t.producerLastReadVersion.pop(),t.producerIndexOfThis.pop()}}function an(t){F(t);for(let e=0;e<t.producerNode.length;e++){let r=t.producerNode[e],n=t.producerLastReadVersion[e];if(n!==r.version||(or(r),n!==r.version))return!0}return!1}function lr(t,e,r){var n;if(mt(t),F(t),t.liveConsumerNode.length===0){(n=t.watched)==null||n.call(t.wrapper);for(let i=0;i<t.producerNode.length;i++)t.producerIndexOfThis[i]=lr(t.producerNode[i],t,i)}return t.liveConsumerIndexOfThis.push(r),t.liveConsumerNode.push(e)-1}function Me(t,e){var r;if(mt(t),F(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){(r=t.unwatched)==null||r.call(t.wrapper);for(let i=0;i<t.producerNode.length;i++)Me(t.producerNode[i],t.producerIndexOfThis[i])}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 i=t.liveConsumerIndexOfThis[e],s=t.liveConsumerNode[e];F(s),s.producerIndexOfThis[i]=e}}function pt(t){var e;return t.consumerIsAlwaysLive||(((e=t?.liveConsumerNode)==null?void 0:e.length)??0)>0}function F(t){t.producerNode??(t.producerNode=[]),t.producerIndexOfThis??(t.producerIndexOfThis=[]),t.producerLastReadVersion??(t.producerLastReadVersion=[])}function mt(t){t.liveConsumerNode??(t.liveConsumerNode=[]),t.liveConsumerIndexOfThis??(t.liveConsumerIndexOfThis=[])}function cr(t){if(or(t),Ie(t),t.value===gt)throw t.error;return t.value}function ln(t){let e=Object.create(cn);e.computation=t;let r=()=>cr(e);return r[Ne]=e,r}var ht=Symbol("UNSET"),ut=Symbol("COMPUTING"),gt=Symbol("ERRORED"),cn={...ft,value:ht,dirty:!0,error:null,equal:sr,producerMustRecompute(t){return t.value===ht||t.value===ut},producerRecomputeValue(t){if(t.value===ut)throw new Error("Detected cycle in computations.");let e=t.value;t.value=ut;let r=sn(t),n,i=!1;try{n=t.computation.call(t.wrapper),i=e!==ht&&e!==gt&&t.equal.call(t.wrapper,e,n)}catch(s){n=gt,t.error=s}finally{on(t,r)}if(i){t.value=e;return}t.value=n,t.version++}};function dn(){throw new Error}var hn=dn;function un(){hn()}function pn(t){let e=Object.create(mn);e.value=t;let r=()=>(Ie(e),e.value);return r[Ne]=e,r}function gn(){return Ie(this),this.value}function fn(t,e){rn()||un(),t.equal.call(t.wrapper,t.value,e)||(t.value=e,vn(t))}var mn={...ft,equal:sr,value:void 0};function vn(t){t.version++,tn(),ar(t)}var _=Symbol("node"),S;(t=>{var e,r,n,i,s,a;class g{constructor(v,d={}){Le(this,r),ct(this,e);let f=pn(v)[Ne];if(this[_]=f,f.wrapper=this,d){let C=d.equals;C&&(f.equal=C),f.watched=d[t.subtle.watched],f.unwatched=d[t.subtle.unwatched]}}get(){if(!(0,t.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.get");return gn.call(this[_])}set(v){if(!(0,t.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.set");if(en())throw new Error("Writes to signals not permitted during Watcher callback");let d=this[_];fn(d,v)}}e=_,r=new WeakSet,n=function(){},t.isState=p=>typeof p=="object"&&dt(r,p),t.State=g;class u{constructor(v,d){Le(this,s),ct(this,i);let f=ln(v)[Ne];if(f.consumerAllowSignalWrites=!0,this[_]=f,f.wrapper=this,d){let C=d.equals;C&&(f.equal=C),f.watched=d[t.subtle.watched],f.unwatched=d[t.subtle.unwatched]}}get(){if(!(0,t.isComputed)(this))throw new TypeError("Wrong receiver type for Signal.Computed.prototype.get");return cr(this[_])}}i=_,s=new WeakSet,a=function(){},t.isComputed=p=>typeof p=="object"&&dt(s,p),t.Computed=u,(p=>{var v,d,A,f,C;function wr(y){let m,h=null;try{h=q(null),m=y()}finally{q(h)}return m}p.untrack=wr;function br(y){var m;if(!(0,t.isComputed)(y)&&!(0,t.isWatcher)(y))throw new TypeError("Called introspectSources without a Computed or Watcher argument");return((m=y[_].producerNode)==null?void 0:m.map(h=>h.wrapper))??[]}p.introspectSources=br;function xr(y){var m;if(!(0,t.isComputed)(y)&&!(0,t.isState)(y))throw new TypeError("Called introspectSinks without a Signal argument");return((m=y[_].liveConsumerNode)==null?void 0:m.map(h=>h.wrapper))??[]}p.introspectSinks=xr;function _r(y){if(!(0,t.isComputed)(y)&&!(0,t.isState)(y))throw new TypeError("Called hasSinks without a Signal argument");let m=y[_].liveConsumerNode;return m?m.length>0:!1}p.hasSinks=_r;function $r(y){if(!(0,t.isComputed)(y)&&!(0,t.isWatcher)(y))throw new TypeError("Called hasSources without a Computed or Watcher argument");let m=y[_].producerNode;return m?m.length>0:!1}p.hasSources=$r;class Sr{constructor(m){Le(this,d),Le(this,f),ct(this,v);let h=Object.create(ft);h.wrapper=this,h.consumerMarkedDirty=m,h.consumerIsAlwaysLive=!0,h.consumerAllowSignalWrites=!1,h.producerNode=[],this[_]=h}watch(...m){if(!(0,t.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");ir(this,f,C).call(this,m);let h=this[_];h.dirty=!1;let L=q(h);for(let me of m)Ie(me[_]);q(L)}unwatch(...m){if(!(0,t.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");ir(this,f,C).call(this,m);let h=this[_];F(h);for(let L=h.producerNode.length-1;L>=0;L--)if(m.includes(h.producerNode[L].wrapper)){Me(h.producerNode[L],h.producerIndexOfThis[L]);let me=h.producerNode.length-1;if(h.producerNode[L]=h.producerNode[me],h.producerIndexOfThis[L]=h.producerIndexOfThis[me],h.producerNode.length--,h.producerIndexOfThis.length--,h.nextProducerIndex--,L<h.producerNode.length){let kr=h.producerIndexOfThis[L],St=h.producerNode[L];mt(St),St.liveConsumerIndexOfThis[kr]=L}}}getPending(){if(!(0,t.isWatcher)(this))throw new TypeError("Called getPending without Watcher receiver");return this[_].producerNode.filter(h=>h.dirty).map(h=>h.wrapper)}}v=_,d=new WeakSet,A=function(){},f=new WeakSet,C=function(y){for(let m of y)if(!(0,t.isComputed)(m)&&!(0,t.isState)(m))throw new TypeError("Called watch/unwatch without a Computed or State argument")},t.isWatcher=y=>dt(d,y),p.Watcher=Sr;function Cr(){var y;return(y=Qr())==null?void 0:y.wrapper}p.currentComputed=Cr,p.watched=Symbol("watched"),p.unwatched=Symbol("unwatched")})(t.subtle||(t.subtle={}))})(S||(S={}));var _i=Symbol("SignalWatcherBrand"),$i=new FinalizationRegistry((({watcher:t,signal:e})=>{t.unwatch(e)}));var{I:Ai}=Bt;var dr=t=>t.strings===void 0;var ae=(t,e)=>{let r=t._$AN;if(r===void 0)return!1;for(let n of r)n._$AO?.(e,!1),ae(n,e);return!0},Ve=t=>{let e,r;do{if((e=t._$AM)===void 0)break;r=e._$AN,r.delete(t),t=e}while(r?.size===0)},hr=t=>{for(let e;e=t._$AM;t=e){let r=e._$AN;if(r===void 0)e._$AN=r=new Set;else if(r.has(t))break;r.add(t),bn(e)}};function yn(t){this._$AN!==void 0?(Ve(this),this._$AM=t,hr(this)):this._$AM=t}function wn(t,e=!1,r=0){let n=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(e)if(Array.isArray(n))for(let s=r;s<n.length;s++)ae(n[s],!1),Ve(n[s]);else n!=null&&(ae(n,!1),Ve(n));else ae(this,t)}var bn=t=>{t.type==Ee.CHILD&&(t._$AP??(t._$AP=wn),t._$AQ??(t._$AQ=yn))},He=class extends W{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,r,n){super._$AT(e,r,n),hr(this),this.isConnected=e._$AU}_$AO(e,r=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),r&&(ae(this,e),Ve(this))}setValue(e){if(dr(this._$Ct))this._$Ct._$AI(e,this);else{let r=[...this._$Ct._$AH];r[this._$Ci]=e,this._$Ct._$AI(r,this,0)}}disconnected(){}reconnected(){}};var Oe=class extends He{_$Sl(){if(this._$Su!==void 0)return;this._$SW=new S.Computed((()=>{var r;return(r=this._$Sj)===null||r===void 0?void 0:r.get()}));let e=this._$Su=new S.subtle.Watcher((()=>{var r;(r=this._$SO)===null||r===void 0||r._(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(S.subtle.untrack((()=>{var e;return(e=this._$SW)===null||e===void 0?void 0:e.get()})))}render(e){return S.subtle.untrack((()=>e.get()))}update(e,[r]){var n,i;return(n=this._$SO)!==null&&n!==void 0||(this._$SO=(i=e.options)===null||i===void 0?void 0:i.host),r!==this._$Sj&&this._$Sj!==void 0&&this._$Sp(),this._$Sj=r,this._$Sl(),S.subtle.untrack((()=>this._$SW.get()))}disconnected(){this._$Sp()}reconnected(){this._$Sl()}},vt=ie(Oe);var yt=t=>(e,...r)=>t(e,...r.map((n=>n instanceof S.State||n instanceof S.Computed?vt(n):n))),xn=yt(o),_n=yt(jt);var Gi=S.State,Zi=S.Computed,ur=(t,e)=>new S.State(t,e);function $n(){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 H=ur($n());function De(t){if(t!==H.get()&&(H.set(t),typeof window<"u")){try{window.localStorage?.setItem("ds-one:theme",t)}catch(r){console.warn("ds-one: unable to persist theme preference",r)}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=H.get(),e=window.document?.documentElement;e&&(e.classList.remove("light-theme","dark-theme"),e.classList.add(`${t}-theme`))}function j(t){if(!(typeof window>"u"))try{let e=window.localStorage?.getItem("ds-one:settings"),n={...e?JSON.parse(e):{},...t};window.localStorage?.setItem("ds-one:settings",JSON.stringify(n))}catch(e){console.warn("ds-one: unable to persist settings",e)}}var Sn=t=>{localStorage.setItem("accentColor",t)},bt=()=>localStorage.getItem("accentColor")||"--blue",wt=()=>{let t=bt();document.documentElement.style.setProperty("--accent-color",`var(${t})`)},Cn=t=>{localStorage.setItem("notesStyleMedium",t)},pr=()=>localStorage.getItem("notesStyleMedium")||"note",gr=t=>{localStorage.setItem("pageStyle",t)},le=()=>localStorage.getItem("pageStyle")||"note",Pe=class extends l{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=at();this.values=e,this.currentValue=$.value,this.label=this.getLabel()}else if(this.type==="theme"){this.values=["light","dark"];let e=H.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=bt();this.currentValue=e,wt(),this.label=this.getLabel()}else if(this.type==="notes-style-medium"){this.values=["default","big","gallery"];let e=pr();this.currentValue=e;let r=le();this.disabled=r==="note",this.label=this.getLabel()}else if(this.type==="page-style"){this.values=["note","page"];let e=le();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,r,n){super.attributeChangedCallback(e,r,n),e==="type"&&r!==n&&this.initializeValues()}async setupInitialValue(){if(this.type==="language"){let e=$.value;this.currentValue=e,this.label=this.getLabel()}else if(this.type==="theme"){let e=H.get();this.currentValue=e,this.label=this.getLabel()}else if(this.type==="accent-color"){let e=bt();this.currentValue=e,wt(),this.label=this.getLabel()}else if(this.type==="notes-style-medium"){let e=pr();this.currentValue=e;let r=le();this.disabled=r==="note",this.label=this.getLabel()}else if(this.type==="page-style"){let e=le();this.currentValue=e,this.label=this.getLabel()}else if(this.type==="icon-only"){let e=le();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,i=this.values[n];this.currentValue=i,document.startViewTransition?document.startViewTransition(()=>{lt(i)}):lt(i),j({language:i}),window.dispatchEvent(new CustomEvent("language-changed",{detail:{language:i}}))}else if(this.type==="theme"){let n=(this.values.indexOf(this.currentValue)+1)%this.values.length,i=this.values[n];this.currentValue=i,De(i),j({theme:i})}else if(this.type==="accent-color"){let n=(this.values.indexOf(this.currentValue)+1)%this.values.length,i=this.values[n];this.currentValue=i,Sn(i),wt(),j({accentColor:i}),window.dispatchEvent(new CustomEvent("accent-color-changed",{detail:{color:i}}))}else if(this.type==="notes-style-medium"){let n=(this.values.indexOf(this.currentValue)+1)%this.values.length,i=this.values[n];this.currentValue=i,Cn(i),j({notesStyleMedium:i}),window.dispatchEvent(new CustomEvent("notes-style-medium-changed",{detail:{style:i}}))}else if(this.type==="page-style"){let n=(this.values.indexOf(this.currentValue)+1)%this.values.length,i=this.values[n];this.currentValue=i,gr(i),j({pageStyle:i}),window.dispatchEvent(new CustomEvent("page-style-changed",{detail:{behavior:i}}))}else if(this.type==="icon-only"){let n=(this.values.indexOf(this.currentValue)+1)%this.values.length,i=this.values[n];this.currentValue=i,gr(i),j({pageStyle:i}),this.label="",window.dispatchEvent(new CustomEvent("page-style-changed",{detail:{behavior:i}}))}this.label=this.getLabel(),this.requestUpdate()}}getValueDisplay(e){if(this.type==="language")return tr(e,{locale:$.value});if(this.type==="theme"){if(this.translationsReady){let r=E(`themes.${e}`);if(r&&r!==`themes.${e}`)return r}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 r=E(e==="note"?"note":"page");if(r&&r!==(e==="note"?"note":"page"))return r}return e}else if(this.type==="icon-only")return e==="note"?o`<icon-v1 type="note"></icon-v1>`:e==="page"?o`<icon-v1 type="page"></icon-v1>`:o`<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 i=E(n);if(i&&i!==n)return i}return e.replace("--","").replace("-"," ")}getNotesStyleIcon(e){return e==="page"?o`<icon-v1 type="page"></icon-v1>`:e==="note"?o`<icon-v1 type="note"></icon-v1>`:e==="default"?o`<icon-v1 type="default"></icon-v1>`:e==="big"?o`<icon-v1 type="big"></icon-v1>`:e==="gallery"?o`<icon-v1 type="gallery"></icon-v1>`:o`<span>${e}</span>`}getLabel(){if(this.type==="language"){if(this.translationsReady){let e=E("language");if(e&&e!=="language")return e}return"Language"}else if(this.type==="theme"){if(this.translationsReady){let e=E("theme");if(e&&e!=="theme")return e}return"Theme"}else if(this.type==="accent-color"){if(this.translationsReady){let e=E("accentColor");if(e&&e!=="accentColor")return e}return"Accent Color"}else if(this.type==="notes-style-medium"){if(this.translationsReady){let e=E("notesStyle");if(e&&e!=="notesStyle")return e}return"Notes Style"}else if(this.type==="page-style"){if(this.translationsReady){let e=E("clickingItem");if(e&&e!=="clickingItem")return e}return"Clic"}else if(this.type==="icon-only")return"";return this.label}render(){return o`
|
|
285
285
|
<div class="cycle-container">
|
|
286
286
|
${this.type!=="icon-only"?o`<span class="cycle-label">${this.label}</span>`:""}
|
|
287
287
|
<div
|
|
@@ -571,7 +571,7 @@ var kt=!1,Er=["./keys.json","./tekst.json","./tekster.json","./language.json",".
|
|
|
571
571
|
@click="${this._navigateHome}"
|
|
572
572
|
@keydown="${this._onKeyDown}"
|
|
573
573
|
>
|
|
574
|
-
<text
|
|
574
|
+
<ds-text key="home"></ds-text>
|
|
575
575
|
</div>
|
|
576
576
|
`}};de.properties={state:{type:String,reflect:!0}};de.styles=c`
|
|
577
577
|
:host {
|
|
@@ -609,7 +609,7 @@ var kt=!1,Er=["./keys.json","./tekst.json","./tekster.json","./language.json",".
|
|
|
609
609
|
}
|
|
610
610
|
|
|
611
611
|
/* Inner text spacing without affecting the 80px outer width */
|
|
612
|
-
.home > text
|
|
612
|
+
.home > ds-text {
|
|
613
613
|
padding: 0 calc(var(--1) * 0.15 * var(--scaling-factor));
|
|
614
614
|
box-sizing: border-box;
|
|
615
615
|
height: 100%;
|
|
@@ -975,7 +975,7 @@ var kt=!1,Er=["./keys.json","./tekst.json","./tekster.json","./language.json",".
|
|
|
975
975
|
}
|
|
976
976
|
`;customElements.define("row-v1",ue);var Je=class extends l{static get properties(){return{type:{type:String,reflect:!0},to:{type:String,reflect:!0}}}constructor(){super(),this.type="work"}render(){let e=this.getNavConfig(),r=this.to||e.href;return o`
|
|
977
977
|
<a href="${r}">
|
|
978
|
-
<text
|
|
978
|
+
<ds-text key="${e.key}"></ds-text>
|
|
979
979
|
<icon-v1 type="right"></icon-v1>
|
|
980
980
|
</a>
|
|
981
981
|
`}getNavConfig(){switch(this.type){case"projects":return{href:"/projects",key:"projects"};case"work":return{href:"/",key:"workExperience"}}}};Je.styles=c`
|
|
@@ -998,12 +998,12 @@ var kt=!1,Er=["./keys.json","./tekst.json","./tekster.json","./language.json",".
|
|
|
998
998
|
${this.previous?o`
|
|
999
999
|
<a href="${this.previous}" class="nav-previous">
|
|
1000
1000
|
<icon-v1 type="left"></icon-v1>
|
|
1001
|
-
<text
|
|
1001
|
+
<ds-text>${this.previousText||"Previous"}</ds-text>
|
|
1002
1002
|
</a>
|
|
1003
1003
|
`:o`<div></div>`}
|
|
1004
1004
|
${this.next?o`
|
|
1005
1005
|
<a href="${this.next}" class="nav-next">
|
|
1006
|
-
<text
|
|
1006
|
+
<ds-text>${this.nextText||"Next"}</ds-text>
|
|
1007
1007
|
<icon-v1 type="right"></icon-v1>
|
|
1008
1008
|
</a>
|
|
1009
1009
|
`:o`<div></div>`}
|
|
@@ -1151,7 +1151,7 @@ var kt=!1,Er=["./keys.json","./tekst.json","./tekster.json","./language.json",".
|
|
|
1151
1151
|
margin-top: 0.5px !important;
|
|
1152
1152
|
margin-left: 0.5px !important;
|
|
1153
1153
|
display: grid;
|
|
1154
|
-
width:
|
|
1154
|
+
width: 1440px;
|
|
1155
1155
|
height: 100%;
|
|
1156
1156
|
grid-template-columns: repeat(auto-fill, 19px);
|
|
1157
1157
|
grid-template-rows: repeat(auto-fill, 19px);
|
|
@@ -1161,7 +1161,7 @@ var kt=!1,Er=["./keys.json","./tekst.json","./tekster.json","./language.json",".
|
|
|
1161
1161
|
column-rule: 1px solid
|
|
1162
1162
|
light-dark(rgba(0, 0, 0, 0.03), rgba(238, 238, 238, 0.022));
|
|
1163
1163
|
outline: 1px solid light-dark(rgba(0, 0, 0, 0.15), #100101e7);
|
|
1164
|
-
position:
|
|
1164
|
+
position: fixed;
|
|
1165
1165
|
top: 0;
|
|
1166
1166
|
left: 50%;
|
|
1167
1167
|
transform: translateX(-50%);
|
|
@@ -1180,8 +1180,9 @@ var kt=!1,Er=["./keys.json","./tekst.json","./tekster.json","./language.json",".
|
|
|
1180
1180
|
}
|
|
1181
1181
|
|
|
1182
1182
|
:host([align="right"]) {
|
|
1183
|
-
left:
|
|
1184
|
-
|
|
1183
|
+
left: auto;
|
|
1184
|
+
right: 0;
|
|
1185
|
+
transform: none;
|
|
1185
1186
|
}
|
|
1186
1187
|
`;customElements.define("ds-grid",ge);var fe=class extends l{render(){let e=this.debug||this.mode==="debug",r=this.mode==="company";return o`
|
|
1187
1188
|
<slot></slot>
|
|
@@ -1220,7 +1221,7 @@ var kt=!1,Er=["./keys.json","./tekst.json","./tekster.json","./language.json",".
|
|
|
1220
1221
|
". footer ."
|
|
1221
1222
|
". . .";
|
|
1222
1223
|
min-height: 600px;
|
|
1223
|
-
background-color: rgba(
|
|
1224
|
+
background-color: rgba(165, 165, 165, 0.03);
|
|
1224
1225
|
position: relative;
|
|
1225
1226
|
width: 100%;
|
|
1226
1227
|
max-width: 640px;
|
|
@@ -1256,10 +1257,6 @@ var kt=!1,Er=["./keys.json","./tekst.json","./tekster.json","./language.json",".
|
|
|
1256
1257
|
justify-self: end;
|
|
1257
1258
|
}
|
|
1258
1259
|
|
|
1259
|
-
:host([mode="debug"]) {
|
|
1260
|
-
background-color: rgba(200, 114, 114, 0.1);
|
|
1261
|
-
}
|
|
1262
|
-
|
|
1263
1260
|
.debug-overlay {
|
|
1264
1261
|
position: absolute;
|
|
1265
1262
|
margin-left: -1px;
|
|
@@ -1308,7 +1305,6 @@ var kt=!1,Er=["./keys.json","./tekst.json","./tekster.json","./language.json",".
|
|
|
1308
1305
|
font-size: 10px;
|
|
1309
1306
|
font-weight: var(--type-weight-default);
|
|
1310
1307
|
font-family: var(--typeface);
|
|
1311
|
-
background-color: var(--slate);
|
|
1312
1308
|
color: var(--black);
|
|
1313
1309
|
border: 1px solid red;
|
|
1314
1310
|
opacity: 1;
|
|
@@ -1316,56 +1312,42 @@ var kt=!1,Er=["./keys.json","./tekst.json","./tekster.json","./language.json",".
|
|
|
1316
1312
|
|
|
1317
1313
|
.debug-square {
|
|
1318
1314
|
grid-area: square;
|
|
1319
|
-
background-color: rgba(255, 0, 0, 0.2);
|
|
1320
1315
|
}
|
|
1321
1316
|
|
|
1322
1317
|
.debug-title {
|
|
1323
1318
|
grid-area: title;
|
|
1324
|
-
background-color: rgba(0, 255, 0, 0.2);
|
|
1325
1319
|
}
|
|
1326
1320
|
|
|
1327
1321
|
.debug-header {
|
|
1328
1322
|
grid-area: header;
|
|
1329
|
-
background-color: rgba(0, 0, 255, 0.2);
|
|
1330
1323
|
border-color: #0000ff;
|
|
1331
1324
|
}
|
|
1332
1325
|
|
|
1333
1326
|
.debug-projects {
|
|
1334
1327
|
grid-area: projects;
|
|
1335
|
-
background-color: rgba(255, 255, 0, 0.2);
|
|
1336
1328
|
border-color: #ffff00;
|
|
1337
1329
|
}
|
|
1338
1330
|
|
|
1339
1331
|
.debug-bio {
|
|
1340
1332
|
grid-area: bio;
|
|
1341
|
-
background-color: rgba(255, 0, 255, 0.2);
|
|
1342
1333
|
border-color: #ff00ff;
|
|
1343
1334
|
}
|
|
1344
1335
|
|
|
1345
1336
|
.debug-nav {
|
|
1346
1337
|
grid-area: nav;
|
|
1347
|
-
background-color: rgba(0, 255, 255, 0.2);
|
|
1348
1338
|
border-color: #00ffff;
|
|
1349
1339
|
}
|
|
1350
1340
|
|
|
1351
1341
|
.debug-footer {
|
|
1352
1342
|
grid-area: footer;
|
|
1353
|
-
background-color: rgba(255, 165, 0, 0.2);
|
|
1354
1343
|
border-color: #ffa500;
|
|
1355
1344
|
}
|
|
1356
1345
|
|
|
1357
|
-
.debug-header {
|
|
1358
|
-
grid-area: header;
|
|
1359
|
-
background-color: rgba(0, 0, 255, 0.2);
|
|
1360
|
-
border-color: #0000ff;
|
|
1361
|
-
}
|
|
1362
|
-
|
|
1363
1346
|
.debug-content {
|
|
1364
1347
|
grid-area: content;
|
|
1365
|
-
background-color: rgba(21, 169, 21, 0.57);
|
|
1366
1348
|
border-color: rgba(71, 231, 71, 0.63);
|
|
1367
1349
|
}
|
|
1368
|
-
`;customElements.define("ds-layout",fe);var $t="ds-scroll-position";function yr(){if(!(typeof window>"u"))try{let t={x:window.scrollX,y:window.scrollY};sessionStorage.setItem($t,JSON.stringify(t))}catch(t){console.warn("[DS one] Failed to save scroll position:",t)}}function
|
|
1350
|
+
`;customElements.define("ds-layout",fe);var $t="ds-scroll-position";function yr(){if(!(typeof window>"u"))try{let t={x:window.scrollX,y:window.scrollY};sessionStorage.setItem($t,JSON.stringify(t))}catch(t){console.warn("[DS one] Failed to save scroll position:",t)}}function kn(){if(typeof window>"u")return null;try{let t=sessionStorage.getItem($t);if(!t)return null;let e=JSON.parse(t);return typeof e.x=="number"&&typeof e.y=="number"&&!isNaN(e.x)&&!isNaN(e.y)?e:null}catch(t){return console.warn("[DS one] Failed to retrieve scroll position:",t),null}}function En(t={}){if(typeof window>"u")return!1;let e=kn();if(!e)return!1;try{return requestAnimationFrame(()=>{window.scrollTo({left:e.x,top:e.y,behavior:t.smooth?"smooth":"instant"}),t.clear&&An(),window.dispatchEvent(new CustomEvent("scroll-restored",{detail:e}))}),!0}catch(r){return console.warn("[DS one] Failed to restore scroll position:",r),!1}}function An(){if(!(typeof window>"u"))try{sessionStorage.removeItem($t)}catch(t){console.warn("[DS one] Failed to clear scroll position:",t)}}function Ln(t={}){if(typeof window>"u")return;let{autoSave:e=!0,autoRestore:r=!0,smooth:n=!1,clearOnRestore:i=!1}=t;if(e&&(window.addEventListener("beforeunload",()=>{yr()}),window.addEventListener("pagehide",()=>{yr()})),r){let s=()=>{En({smooth:n,clear:i})};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",s):s()}}typeof window<"u"&&Ln({autoSave:!0,autoRestore:!0,smooth:!1,clearOnRestore:!1});export{qe as Article,Be as Attributes,ne as Button,Pe as Cycle,Ye as DoubleNav,he as DownloadCV,pe as DsTable,ge as Grid,We as Header,de as Home,B as Icon,fe as Layout,Ae as Link,Ge as List,Ze as Panel,Ue as Price,ue as Row,Je as SingleNav,Ke as SquareCircle,ke as Text,ze as Title,ce as Tooltip,Fe as ViewToggle,je as Year,An as clearScrollPosition,$ as currentLanguage,H as currentTheme,Qn as getAvailableLanguages,at as getAvailableLanguagesSync,Gr as getBrowserLanguage,tr as getLanguageDisplayName,rr as getNotionText,mr as getPriceLabel,kn as getScrollPosition,x as getText,K as getViewMode,Yn as hasTranslation,Ln as initScrollManagement,ei as loadTranslations,En as restoreScrollPosition,yr as saveScrollPosition,j as saveSettings,lt as setLanguage,Xn as setNotionText,De as setTheme,_t as setViewMode,Os as toggleViewMode,E as translate};
|
|
1369
1351
|
/*! Bundled license information:
|
|
1370
1352
|
|
|
1371
1353
|
@lit/reactive-element/css-tag.js:
|