domma-js 0.40.0 → 0.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
1
  /*!
2
- * Domma v0.40.0
2
+ * Domma v0.41.0
3
3
  * Dynamic Object Manipulation & Modeling API
4
4
  * (c) 2026 Darryl Waterhouse & DCBW-IT
5
- * Built: 2026-08-21T16:29:17.564Z
6
- * Commit: c788672
5
+ * Built: 2026-08-22T13:41:39.977Z
6
+ * Commit: 5d8b7e1
7
7
  */
8
8
  !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Domma={})}(this,function(e){"use strict";function t(e){if(null==e)return"";const t=document.createElement("div");return t.textContent=String(e),t.innerHTML}function n(){return"undefined"!=typeof window&&void 0!==window.DOMPurify}const o={ALLOWED_TAGS:["b","i","em","strong","u","s","mark","small","del","ins","sub","sup","p","br","hr","div","span","blockquote","pre","code","ul","ol","li","dl","dt","dd","h1","h2","h3","h4","h5","h6","a","table","thead","tbody","tfoot","tr","th","td","caption","col","colgroup","img","figure","figcaption","article","section","nav","aside","header","footer","main","time","address"],ALLOWED_ATTR:["href","title","target","rel","class","id","alt","src","width","height","colspan","rowspan","aria-label","aria-describedby","aria-hidden","role"],ALLOWED_URI_REGEXP:/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,ALLOW_DATA_ATTR:!1,ALLOW_UNKNOWN_PROTOCOLS:!1,SAFE_FOR_TEMPLATES:!0,RETURN_DOM:!1,RETURN_DOM_FRAGMENT:!1,FORCE_BODY:!0},s={default:o,strict:{ALLOWED_TAGS:["b","i","em","strong","p","br","a","ul","ol","li"],ALLOWED_ATTR:["href","title","target"],ALLOW_DATA_ATTR:!1},basic:{ALLOWED_TAGS:["b","i","em","strong","br"],ALLOWED_ATTR:[],ALLOW_DATA_ATTR:!1}};function i(e,i={}){if(null==e||""===e)return"";if(e=String(e),n()){const n=i.preset||"default",r={...s[n]||o,...i.allowedTags&&{ALLOWED_TAGS:i.allowedTags},...i.allowedAttrs&&{ALLOWED_ATTR:i.allowedAttrs},...void 0!==i.allowDataAttrs&&{ALLOW_DATA_ATTR:i.allowDataAttrs}};try{return window.DOMPurify.sanitize(e,r)}catch(n){return console.error("DOMPurify sanitisation failed:",n),t(e)}}return console.warn("DOMPurify not available. Using HTML escape fallback. For better XSS protection, include DOMPurify."),t(e)}"undefined"==typeof window||n()||console.warn("%c⚠️ Security Warning: DOMPurify not loaded","color: orange; font-weight: bold; font-size: 14px;","\nFor robust XSS protection, include DOMPurify before Domma:",'\n<script src="https://cdn.jsdelivr.net/npm/dompurify@3/dist/purify.min.js"><\/script>',"\nCurrently using HTML escape fallback.");var r={sanitise:i,sanitiseBasic:function(e){return i(e,{preset:"basic"})},sanitiseUserContent:function(e){return i(e,{preset:"strict"})},escape:function(e){return t(e)},hasDOMPurify:function(){return n()}};class a{constructor(e,t){if("string"==typeof e)if(e.trim().startsWith("<")){const t=document.createElement("div");t.innerHTML=e.trim(),this.elements=Array.from(t.children)}else{const n=t||document;this.elements=Array.from(n.querySelectorAll(e))}else e instanceof Node?this.elements=[e]:e instanceof NodeList||e instanceof HTMLCollection?this.elements=Array.from(e):Array.isArray(e)?this.elements=e.filter(e=>e instanceof HTMLElement):this.elements=e instanceof a?[...e.elements]:[];this.length=this.elements.length;for(let e=0;e<this.elements.length;e++)this[e]=this.elements[e]}find(e){const t=[];return this.elements.forEach(n=>{t.push(...n.querySelectorAll(e))}),new a(t)}children(e){const t=[];return this.elements.forEach(e=>{t.push(...e.children)}),new a(e?t.filter(t=>t.matches(e)):t)}parent(e){const t=[];return this.elements.forEach(n=>{n.parentElement&&(e&&!n.parentElement.matches(e)||t.includes(n.parentElement)||t.push(n.parentElement))}),new a(t)}parents(e){const t=[];return this.elements.forEach(n=>{let o=n.parentElement;for(;o;)e&&!o.matches(e)||t.includes(o)||t.push(o),o=o.parentElement}),new a(t)}closest(e){const t=[];return this.elements.forEach(n=>{const o=n.closest(e);o&&!t.includes(o)&&t.push(o)}),new a(t)}siblings(e){const t=[];return this.elements.forEach(n=>{n.parentElement&&Array.from(n.parentElement.children).forEach(o=>{o===n||t.includes(o)||e&&!o.matches(e)||t.push(o)})}),new a(t)}next(e){const t=[];return this.elements.forEach(n=>{let o=n.nextElementSibling;o&&(e&&!o.matches(e)||t.push(o))}),new a(t)}nextAll(e){const t=[];return this.elements.forEach(n=>{let o=n.nextElementSibling;for(;o;)e&&!o.matches(e)||t.includes(o)||t.push(o),o=o.nextElementSibling}),new a(t)}prev(e){const t=[];return this.elements.forEach(n=>{let o=n.previousElementSibling;o&&(e&&!o.matches(e)||t.push(o))}),new a(t)}prevAll(e){const t=[];return this.elements.forEach(n=>{let o=n.previousElementSibling;for(;o;)e&&!o.matches(e)||t.includes(o)||t.unshift(o),o=o.previousElementSibling}),new a(t)}first(){return new a(this.elements[0]?[this.elements[0]]:[])}last(){return new a(this.elements.length?[this.elements[this.elements.length-1]]:[])}eq(e){const t=e<0?this.elements.length+e:e;return new a(this.elements[t]?[this.elements[t]]:[])}get(e){if(void 0===e)return this.elements;const t=e<0?this.elements.length+e:e;return this.elements[t]}filter(e){return new a("function"==typeof e?this.elements.filter((t,n)=>e.call(t,n,t)):this.elements.filter(t=>t.matches(e)))}not(e){return new a("function"==typeof e?this.elements.filter((t,n)=>!e.call(t,n,t)):this.elements.filter(t=>!t.matches(e)))}is(e){return this.elements.some(t=>t.matches(e))}has(e){return new a(this.elements.filter(t=>t.querySelector(e)))}add(e){const t=new a(e),n=[...this.elements];return t.elements.forEach(e=>{n.includes(e)||n.push(e)}),new a(n)}contents(){const e=[];return this.elements.forEach(t=>{e.push(...t.childNodes)}),new a(e)}toArray(){return[...this.elements]}index(e){if(void 0===e){const e=this.elements[0];return e&&e.parentElement?Array.from(e.parentElement.children).indexOf(e):-1}return"string"==typeof e?new a(e).elements.indexOf(this.elements[0]):this.elements.indexOf(e)}each(e){return this.elements.forEach((t,n)=>e.call(t,n,t)),this}html(e,t={}){if(void 0===e){const e=this.elements[0];return e?e.innerHTML:""}return!1!==t.safe&&(e=r.sanitise(e,t)),this.each((t,n)=>{n.innerHTML=e})}text(e){return void 0===e?this.elements.map(e=>e.textContent).join(""):this.each((t,n)=>{n.textContent=e})}val(e){if(void 0===e){const e=this.elements[0];if(!e)return;return"checkbox"===e.type||"radio"===e.type?e.checked?e.value:void 0:"SELECT"===e.tagName&&e.multiple?Array.from(e.selectedOptions).map(e=>e.value):e.value}return this.each((t,n)=>{"checkbox"===n.type||"radio"===n.type?n.checked=Array.isArray(e)?e.includes(n.value):n.value===e:"SELECT"===n.tagName&&n.multiple&&Array.isArray(e)?Array.from(n.options).forEach(t=>{t.selected=e.includes(t.value)}):n.value=e})}attr(e,t){return"object"==typeof e?this.each((t,n)=>{Object.entries(e).forEach(([e,t])=>{n.setAttribute(e,t)})}):void 0===t?this.elements[0]?this.elements[0].getAttribute(e):void 0:this.each((n,o)=>{o.setAttribute(e,t)})}removeAttr(e){const t=e.split(/\s+/);return this.each((e,n)=>{t.forEach(e=>n.removeAttribute(e))})}prop(e,t){return"object"==typeof e?this.each((t,n)=>{Object.entries(e).forEach(([e,t])=>{n[e]=t})}):void 0===t?this.elements[0]?this.elements[0][e]:void 0:this.each((n,o)=>{o[e]=t})}removeProp(e){return this.each((t,n)=>{delete n[e]})}data(e,t){if(void 0===e){const e=this.elements[0];if(!e)return;const t={};return Object.keys(e.dataset).forEach(n=>{t[n]=e.dataset[n]}),t}return"object"==typeof e?this.each((t,n)=>{Object.entries(e).forEach(([e,t])=>{n.dataset[e]=t})}):void 0===t?this.elements[0]?this.elements[0].dataset[e]:void 0:this.each((n,o)=>{o.dataset[e]=t})}removeData(e){return this.each((t,n)=>{delete n.dataset[e]})}css(e,t){return"object"==typeof e?this.each((t,n)=>{Object.entries(e).forEach(([e,t])=>{n.style[e]=t})}):void 0===t?this.elements[0]?getComputedStyle(this.elements[0])[e]:"":this.each((n,o)=>{o.style[e]=t})}addClass(e){if("function"==typeof e)return this.each((t,n)=>{const o=e.call(n,t,n.className);o&&n.classList.add(...o.split(/\s+/).filter(Boolean))});const t=e.split(/\s+/).filter(Boolean);return this.each((e,n)=>{n.classList.add(...t)})}removeClass(e){if(void 0===e)return this.each((e,t)=>{t.className=""});if("function"==typeof e)return this.each((t,n)=>{const o=e.call(n,t,n.className);o&&n.classList.remove(...o.split(/\s+/).filter(Boolean))});const t=e.split(/\s+/).filter(Boolean);return this.each((e,n)=>{n.classList.remove(...t)})}toggleClass(e,t){if("function"==typeof e)return this.each((n,o)=>{const s=e.call(o,n,o.className,t);s&&s.split(/\s+/).filter(Boolean).forEach(e=>{o.classList.toggle(e,t)})});const n=e.split(/\s+/).filter(Boolean);return this.each((e,o)=>{n.forEach(e=>{o.classList.toggle(e,t)})})}hasClass(e){return this.elements.some(t=>t.classList.contains(e))}append(e){return this.each((t,n)=>{this._getNodes(e,t,n).forEach(e=>n.appendChild(e))})}prepend(e){return this.each((t,n)=>{const o=this._getNodes(e,t,n),s=n.firstChild;o.forEach(e=>n.insertBefore(e,s))})}after(e){return this.each((t,n)=>{const o=this._getNodes(e,t,n),s=n.parentNode,i=n.nextSibling;o.forEach(e=>s.insertBefore(e,i))})}before(e){return this.each((t,n)=>{const o=this._getNodes(e,t,n),s=n.parentNode;o.forEach(e=>s.insertBefore(e,n))})}appendTo(e){return new a(e).append(this),this}prependTo(e){return new a(e).prepend(this),this}insertAfter(e){return new a(e).after(this),this}insertBefore(e){return new a(e).before(this),this}wrap(e){return this.each((t,n)=>{const o=this._getWrapper(e,t,n);n.parentNode&&(n.parentNode.insertBefore(o,n),o.appendChild(n))})}wrapAll(e){if(0===this.elements.length)return this;const t=this._getWrapper(e,0,this.elements[0]);return this.elements[0].parentNode.insertBefore(t,this.elements[0]),this.elements.forEach(e=>t.appendChild(e)),this}wrapInner(e){return this.each((t,n)=>{const o=this._getWrapper(e,t,n);for(;n.firstChild;)o.appendChild(n.firstChild);n.appendChild(o)})}unwrap(e){return this.parent(e).each((e,t)=>{const n=t.parentNode;for(;t.firstChild;)n.insertBefore(t.firstChild,t);n.removeChild(t)}),this}remove(e){return(e?this.filter(e):this).each((e,t)=>{t.parentNode&&t.parentNode.removeChild(t)}),this}detach(){return this.remove()}empty(){return this.each((e,t)=>{t.innerHTML=""})}clone(e=!0){return new a(this.elements.map(t=>t.cloneNode(e)))}replaceWith(e){return this.each((t,n)=>{const o=this._getNodes(e,t,n),s=n.parentNode;o.forEach((e,t)=>{0===t?s.replaceChild(e,n):s.insertBefore(e,o[t-1].nextSibling)})})}replaceAll(e){return new a(e).replaceWith(this),this}_getNodes(e,t,n){if("function"==typeof e&&(e=e.call(n,t,n.innerHTML)),"string"==typeof e){if(e.trim().startsWith("<")){const t=document.createElement("div");return t.innerHTML=e,Array.from(t.childNodes)}return[document.createTextNode(e)]}return e instanceof HTMLElement?[e.cloneNode(!0)]:e instanceof a?e.elements.map(e=>e.cloneNode(!0)):[]}_getWrapper(e,t,n){let o;if("function"==typeof e&&(e=e.call(n,t)),"string"==typeof e){const t=document.createElement("div");t.innerHTML=e.trim(),o=t.firstElementChild}else o=e instanceof HTMLElement?e.cloneNode(!0):e instanceof a?e.elements[0].cloneNode(!0):document.createElement("div");return o}on(e,t,n){"function"==typeof t&&(n=t,t=null);const o=e.split(/\s+/);return this.each((e,s)=>{o.forEach(e=>{if(t){const o=e=>{const o=e.target.closest(t);o&&s.contains(o)&&n.call(o,e)};s.addEventListener(e,o),s._dommaHandlers=s._dommaHandlers||[],s._dommaHandlers.push({event:e,selector:t,handler:n,delegated:o})}else s.addEventListener(e,n)})})}off(e,t,n){return"function"==typeof t&&(n=t,t=null),this.each((o,s)=>{if(e){e.split(/\s+/).forEach(e=>{t&&s._dommaHandlers?s._dommaHandlers=s._dommaHandlers.filter(o=>!!(o.event!==e||o.selector!==t||n&&o.handler!==n)||(s.removeEventListener(e,o.delegated),!1)):n&&s.removeEventListener(e,n)})}})}one(e,t,n){"function"==typeof t&&(n=t,t=null);const o=this,s=function(i){n.call(this,i),o.off(e,t,s)};return this.on(e,t,s)}trigger(e,t){const n=new CustomEvent(e,{detail:t,bubbles:!0,cancelable:!0});return this.each((e,t)=>{t.dispatchEvent(n)})}triggerNative(e){return this.each((t,n)=>{const o=new Event(e,{bubbles:!0,cancelable:!0});n.dispatchEvent(o)})}click(e){return e?this.on("click",e):this.triggerNative("click")}dblclick(e){return e?this.on("dblclick",e):this.trigger("dblclick")}mousedown(e){return e?this.on("mousedown",e):this.trigger("mousedown")}mouseup(e){return e?this.on("mouseup",e):this.trigger("mouseup")}mousemove(e){return e?this.on("mousemove",e):this.trigger("mousemove")}mouseover(e){return e?this.on("mouseover",e):this.trigger("mouseover")}mouseout(e){return e?this.on("mouseout",e):this.trigger("mouseout")}mouseenter(e){return e?this.on("mouseenter",e):this.trigger("mouseenter")}mouseleave(e){return e?this.on("mouseleave",e):this.trigger("mouseleave")}keydown(e){return e?this.on("keydown",e):this.trigger("keydown")}keyup(e){return e?this.on("keyup",e):this.trigger("keyup")}keypress(e){return e?this.on("keypress",e):this.trigger("keypress")}focus(e){return e?this.on("focus",e):this.each((e,t)=>t.focus())}blur(e){return e?this.on("blur",e):this.each((e,t)=>t.blur())}change(e){return e?this.on("change",e):this.trigger("change")}select(e){return e?this.on("select",e):this.trigger("select")}submit(e){return e?this.on("submit",e):this.each((e,t)=>{t.submit&&t.submit()})}scroll(e){return e?this.on("scroll",e):this.trigger("scroll")}resize(e){return e?this.on("resize",e):this.trigger("resize")}hover(e,t){return this.on("mouseenter",e),t?this.on("mouseleave",t):this.on("mouseleave",e),this}show(e,t){return this.each((n,o)=>{e?(o.style.display="",o.style.opacity="0",o.style.transition=`opacity ${this._getDuration(e)}ms`,requestAnimationFrame(()=>{o.style.opacity="1",t&&setTimeout(()=>t.call(o),this._getDuration(e))})):(o.style.display="",t&&t.call(o))})}hide(e,t){return this.each((n,o)=>{e?(o.style.transition=`opacity ${this._getDuration(e)}ms`,o.style.opacity="0",setTimeout(()=>{o.style.display="none",o.style.opacity="",o.style.transition="",t&&t.call(o)},this._getDuration(e))):(o.style.display="none",t&&t.call(o))})}toggle(e,t){return this.each((n,o)=>{"none"===getComputedStyle(o).display?new a(o).show(e,t):new a(o).hide(e,t)})}fadeIn(e=400,t){return this.each((n,o)=>{o.style.display="",o.style.opacity="0",o.style.transition=`opacity ${this._getDuration(e)}ms`,requestAnimationFrame(()=>{o.style.opacity="1",setTimeout(()=>{o.style.transition="",t&&t.call(o)},this._getDuration(e))})})}fadeOut(e=400,t){return this.each((n,o)=>{o.style.transition=`opacity ${this._getDuration(e)}ms`,o.style.opacity="0",setTimeout(()=>{o.style.display="none",o.style.opacity="",o.style.transition="",t&&t.call(o)},this._getDuration(e))})}fadeToggle(e=400,t){return this.each((n,o)=>{"none"===getComputedStyle(o).display||"0"===getComputedStyle(o).opacity?new a(o).fadeIn(e,t):new a(o).fadeOut(e,t)})}fadeTo(e,t,n){return this.each((o,s)=>{s.style.display="",s.style.transition=`opacity ${this._getDuration(e)}ms`,requestAnimationFrame(()=>{s.style.opacity=String(t),setTimeout(()=>{s.style.transition="",n&&n.call(s)},this._getDuration(e))})})}slideUp(e=400,t){return this.each((n,o)=>{const s=o.offsetHeight;o.style.overflow="hidden",o.style.height=s+"px",o.style.transition=`height ${this._getDuration(e)}ms`,requestAnimationFrame(()=>{o.style.height="0",setTimeout(()=>{o.style.display="none",o.style.height="",o.style.overflow="",o.style.transition="",t&&t.call(o)},this._getDuration(e))})})}slideDown(e=400,t){return this.each((n,o)=>{o.style.display="";const s=o.scrollHeight;o.style.overflow="hidden",o.style.height="0",o.style.transition=`height ${this._getDuration(e)}ms`,requestAnimationFrame(()=>{o.style.height=s+"px",setTimeout(()=>{o.style.height="",o.style.overflow="",o.style.transition="",t&&t.call(o)},this._getDuration(e))})})}slideToggle(e=400,t){return this.each((n,o)=>{"none"===getComputedStyle(o).display?new a(o).slideDown(e,t):new a(o).slideUp(e,t)})}animate(e,t=400,n="ease",o){"function"==typeof t?(o=t,t=400,n="ease"):"function"==typeof n&&(o=n,n="ease");const s=Object.keys(e).join(", "),i=this._getDuration(t);return this.each((t,r)=>{r.style.transition=`${s} ${i}ms ${n}`,requestAnimationFrame(()=>{Object.entries(e).forEach(([e,t])=>{r.style[e]="number"==typeof t?t+"px":t}),setTimeout(()=>{r.style.transition="",o&&o.call(r)},i)})})}stop(){return this.each((e,t)=>{const n=getComputedStyle(t);t.style.transition="none",["opacity","height","width"].forEach(e=>{t.style[e]&&(t.style[e]=n[e])})})}delay(e){return new Promise(t=>{setTimeout(()=>t(this),e)})}_getDuration(e){return"number"==typeof e?e:"fast"===e?200:"slow"===e?600:400}width(e){if(void 0===e){const e=this.elements[0];if(!e)return;return e.getBoundingClientRect().width}return this.each((t,n)=>{const o="function"==typeof e?e.call(n,t,new a(n).width()):e;n.style.width="number"==typeof o?o+"px":o})}height(e){if(void 0===e){const e=this.elements[0];if(!e)return;return e.getBoundingClientRect().height}return this.each((t,n)=>{const o="function"==typeof e?e.call(n,t,new a(n).height()):e;n.style.height="number"==typeof o?o+"px":o})}innerWidth(){const e=this.elements[0];return e?e.clientWidth:void 0}innerHeight(){const e=this.elements[0];return e?e.clientHeight:void 0}outerWidth(e=!1){const t=this.elements[0];if(!t)return;let n=t.offsetWidth;if(e){const e=getComputedStyle(t);n+=parseFloat(e.marginLeft)+parseFloat(e.marginRight)}return n}outerHeight(e=!1){const t=this.elements[0];if(!t)return;let n=t.offsetHeight;if(e){const e=getComputedStyle(t);n+=parseFloat(e.marginTop)+parseFloat(e.marginBottom)}return n}offset(e){if(void 0===e){const e=this.elements[0];if(!e)return;const t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}}return this.each((t,n)=>{"static"===getComputedStyle(n).position&&(n.style.position="relative");const o=new a(n).offset(),s=parseFloat(getComputedStyle(n).left)||0,i=parseFloat(getComputedStyle(n).top)||0;void 0!==e.left&&(n.style.left=s+e.left-o.left+"px"),void 0!==e.top&&(n.style.top=i+e.top-o.top+"px")})}position(){const e=this.elements[0];if(e)return{top:e.offsetTop,left:e.offsetLeft}}scrollTop(e){if(void 0===e){const e=this.elements[0];if(!e)return;return e===window?window.pageYOffset:e.scrollTop}return this.each((t,n)=>{n===window?window.scrollTo(window.pageXOffset,e):n.scrollTop=e})}scrollLeft(e){if(void 0===e){const e=this.elements[0];if(!e)return;return e===window?window.pageXOffset:e.scrollLeft}return this.each((t,n)=>{n===window?window.scrollTo(e,window.pageYOffset):n.scrollLeft=e})}offsetParent(){return new a(this.elements.map(e=>e.offsetParent||document.body))}}const l=(e,t)=>"function"==typeof e?("loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):e(),new a([])):new a(e,t),d={async request(e,t,n=null,o={}){const s={method:e,headers:{...o.headers},credentials:o.credentials||"include",...o};n&&"GET"!==e&&"HEAD"!==e&&(s.headers["Content-Type"]="application/json",s.body=JSON.stringify(n));try{const e=await fetch(t,s);if(!e.ok){let t=`HTTP Error: ${e.status}`;try{const n=await e.json();n.message?t=n.message:n.error&&(t=n.error)}catch(n){t=`HTTP Error: ${e.status} ${e.statusText}`}throw new Error(t)}return await e.json()}catch(e){throw o.silent||console.error("Domma HTTP Error:",e),e}},get(e,t){return this.request("GET",e,null,t)},post(e,t,n){return this.request("POST",e,t,n)},put(e,t,n){return this.request("PUT",e,t,n)},patch(e,t,n){return this.request("PATCH",e,t,n)},delete(e,t){return this.request("DELETE",e,{delete:!0},t)},head(e,t){return this.request("HEAD",e,null,t)},options(e,t){return this.request("OPTIONS",e,null,t)}},c={chunk(e,t=1){if(!e||t<1)return[];const n=[];for(let o=0;o<e.length;o+=t)n.push(e.slice(o,o+t));return n},compact:e=>e?e.filter(Boolean):[],concat:(e,...t)=>e?e.concat(...t):[],difference(e,...t){if(!e)return[];const n=new Set(t.flat());return e.filter(e=>!n.has(e))},differenceBy(e,t,n){if(!e)return[];const o=new Set(t.map(n));return e.filter(e=>!o.has(n(e)))},differenceWith:(e,t,n)=>e?e.filter(e=>!t.some(t=>n(e,t))):[],drop:(e,t=1)=>e?e.slice(t):[],dropRight(e,t=1){if(!e)return[];const n=e.length-t;return n>0?e.slice(0,n):[]},dropRightWhile(e,t){if(!e)return[];let n=e.length;for(;n--&&t(e[n],n,e););return e.slice(0,n+1)},dropWhile(e,t){if(!e)return[];let n=0;for(;n<e.length&&t(e[n],n,e);)n++;return e.slice(n)},eq:(e,t)=>e===t||e!=e&&t!=t,fill:(e,t,n=0,o)=>e?e.fill(t,n,o):[],findIndex(e,t,n=0){if(!e)return-1;for(let o=n;o<e.length;o++)if(t(e[o],o,e))return o;return-1},findLastIndex(e,t,n){if(!e)return-1;for(let o=void 0!==n?n:e.length-1;o>=0;o--)if(t(e[o],o,e))return o;return-1},first:e=>e?e[0]:void 0,head(e){return this.first(e)},flatten:e=>e?e.flat(1):[],flattenDeep:e=>e?e.flat(1/0):[],flattenDepth:(e,t=1)=>e?e.flat(t):[],fromPairs:e=>e?Object.fromEntries(e):{},indexOf:(e,t,n=0)=>e?e.indexOf(t,n):-1,initial:e=>e?e.slice(0,-1):[],intersection(...e){if(!e.length)return[];return e[0].filter(t=>e.every(e=>e.includes(t)))},join:(e,t=",")=>e?e.join(t):"",last:e=>e?e[e.length-1]:void 0,lastIndexOf:(e,t,n)=>e?void 0!==n?e.lastIndexOf(t,n):e.lastIndexOf(t):-1,nth(e,t=0){if(e)return t<0?e[e.length+t]:e[t]},pull(e,...t){if(!e)return[];const n=new Set(t);for(let t=e.length-1;t>=0;t--)n.has(e[t])&&e.splice(t,1);return e},pullAt(e,...t){if(!e)return[];const n=t.flat().sort((e,t)=>t-e),o=[];return n.forEach(t=>{t>=0&&t<e.length&&o.unshift(e.splice(t,1)[0])}),o},reverse:e=>e?e.reverse():[],slice:(e,t=0,n)=>e?void 0!==n?e.slice(t,n):e.slice(t):[],tail:e=>e?e.slice(1):[],take:(e,t=1)=>e?e.slice(0,t):[],takeRight(e,t=1){if(!e)return[];const n=Math.max(0,e.length-t);return e.slice(n)},union:(...e)=>[...new Set(e.flat())],uniq:e=>e?[...new Set(e)]:[],uniqBy(e,t){if(!e)return[];const n=new Set;return e.filter(e=>{const o=t(e);return!n.has(o)&&(n.add(o),!0)})},without(e,...t){if(!e)return[];const n=new Set(t);return e.filter(e=>!n.has(e))},xor(...e){if(!e.length)return[];const t=new Map;return e.flat().forEach(e=>{t.set(e,(t.get(e)||0)+1)}),[...t.entries()].filter(([,e])=>1===e).map(([e])=>e)},zip(...e){if(!e.length)return[];const t=Math.max(...e.map(e=>e.length)),n=[];for(let o=0;o<t;o++)n.push(e.map(e=>e[o]));return n},zipObject(e,t){if(!e)return{};const n={};return e.forEach((e,o)=>{n[e]=t?t[o]:void 0}),n},times(e,t){if((e=Math.floor(e))<1)return[];const n=new Array(e);for(let o=0;o<e;o++)n[o]=t?t(o):o;return n},range(e,t,n){if(void 0===t&&(t=e,e=0),0===(n=void 0===n?e<t?1:-1:n))return[];const o=Math.max(Math.ceil((t-e)/(n||1)),0),s=new Array(o);for(let t=0;t<o;t++)s[t]=e+t*n;return s},uniqueId:(()=>{let e=0;return function(t=""){const n=++e;return t?`${t}${n}`:String(n)}})(),countBy(e,t){const n={};return this.each(e,e=>{const o=t(e);n[o]=(n[o]||0)+1}),n},each:(e,t)=>(Array.isArray(e)?e.forEach((n,o)=>t(n,o,e)):e&&"object"==typeof e&&Object.keys(e).forEach(n=>t(e[n],n,e)),e),forEach(e,t){return this.each(e,t)},eachRight(e,t){if(Array.isArray(e))for(let n=e.length-1;n>=0;n--)t(e[n],n,e);else if(e&&"object"==typeof e){Object.keys(e).reverse().forEach(n=>t(e[n],n,e))}return e},forEachRight(e,t){return this.eachRight(e,t)},every:(e,t)=>Array.isArray(e)?e.every(t):!e||"object"!=typeof e||Object.values(e).every(t),filter:(e,t)=>Array.isArray(e)?e.filter(t):e&&"object"==typeof e?Object.values(e).filter(t):[],find:(e,t)=>Array.isArray(e)?e.find(t):e&&"object"==typeof e?Object.values(e).find(t):void 0,findLast(e,t){if(Array.isArray(e)){for(let n=e.length-1;n>=0;n--)if(t(e[n],n,e))return e[n]}else if(e&&"object"==typeof e){return Object.values(e).reverse().find(t)}},flatMap(e,t){return this.map(e,t).flat(1)},flatMapDeep(e,t){return this.map(e,t).flat(1/0)},groupBy(e,t){const n={};return this.each(e,e=>{const o="function"==typeof t?t(e):e[t];n[o]||(n[o]=[]),n[o].push(e)}),n},includes:(e,t,n=0)=>"string"==typeof e||Array.isArray(e)?e.includes(t,n):!(!e||"object"!=typeof e)&&Object.values(e).includes(t),keyBy(e,t){const n={};return this.each(e,e=>{const o="function"==typeof t?t(e):e[t];n[o]=e}),n},map:(e,t)=>Array.isArray(e)?e.map(t):e&&"object"==typeof e?Object.entries(e).map(([n,o])=>t(o,n,e)):[],orderBy(e,t,n){const o=Array.isArray(e)?[...e]:Object.values(e),s=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n||"asc"];return o.sort((e,t)=>{for(let n=0;n<s.length;n++){const o=s[n],r=i[n]||"asc",a="function"==typeof o?o(e):e[o],l="function"==typeof o?o(t):t[o];if(a<l)return"asc"===r?-1:1;if(a>l)return"asc"===r?1:-1}return 0})},partition(e,t){const n=[],o=[];return this.each(e,(s,i)=>{t(s,i,e)?n.push(s):o.push(s)}),[n,o]},reduce(e,t,n){if(Array.isArray(e))return void 0!==n?e.reduce(t,n):e.reduce(t);if(e&&"object"==typeof e){const o=Object.entries(e);let s=n,i=0;void 0===s&&o.length>0&&(s=o[0][1],i=1);for(let n=i;n<o.length;n++){const[i,r]=o[n];s=t(s,r,i,e)}return s}return n},reduceRight(e,t,n){if(Array.isArray(e))return void 0!==n?e.reduceRight(t,n):e.reduceRight(t);if(e&&"object"==typeof e){const o=Object.entries(e).reverse();let s=n,i=0;void 0===s&&o.length>0&&(s=o[0][1],i=1);for(let n=i;n<o.length;n++){const[i,r]=o[n];s=t(s,r,i,e)}return s}return n},reject(e,t){return this.filter(e,(e,n,o)=>!t(e,n,o))},sample(e){const t=Array.isArray(e)?e:Object.values(e||{});return t[Math.floor(Math.random()*t.length)]},sampleSize(e,t=1){return this.shuffle(Array.isArray(e)?[...e]:Object.values(e||{})).slice(0,t)},shuffle(e){const t=Array.isArray(e)?[...e]:Object.values(e||{});for(let e=t.length-1;e>0;e--){const n=Math.floor(Math.random()*(e+1));[t[e],t[n]]=[t[n],t[e]]}return t},size:e=>null==e?0:"string"==typeof e||Array.isArray(e)?e.length:"object"==typeof e?Object.keys(e).length:0,some:(e,t)=>Array.isArray(e)?e.some(t):!(!e||"object"!=typeof e)&&Object.values(e).some(t),sortBy:(e,t)=>(Array.isArray(e)?[...e]:Object.values(e)).sort((e,n)=>{const o="function"==typeof t?t(e):e[t],s="function"==typeof t?t(n):n[t];return o<s?-1:o>s?1:0}),after(e,t){let n=0;return function(...o){if(++n>=e)return t.apply(this,o)}},ary:(e,t=e.length)=>function(...n){return e.apply(this,n.slice(0,t))},before(e,t){let n,o=0;return function(...s){return++o<e&&(n=t.apply(this,s)),n}},bind:(e,t,...n)=>function(...o){return e.apply(t,[...n,...o])},curry:(e,t=e.length)=>function n(...o){return o.length>=t?e.apply(this,o):function(...e){return n.apply(this,[...o,...e])}},curryRight:(e,t=e.length)=>function n(...o){return o.length>=t?e.apply(this,o):function(...e){return n.apply(this,[...e,...o])}},debounce(e,t=0,n={}){let o,s,i,r,a,l=0;const d=n.leading||!1,c=!1!==n.trailing,h=n.maxWait;function u(t){const n=s,o=i;return s=i=void 0,l=t,r=e.apply(o,n),r}function p(e){const n=e-a;return void 0===a||n>=t||n<0||void 0!==h&&e-l>=h}function m(){const e=Date.now();if(p(e))return f(e);o=setTimeout(m,function(e){const n=e-a,o=e-l,s=t-n;return void 0!==h?Math.min(s,h-o):s}(e))}function f(e){return o=void 0,c&&s?u(e):(s=i=void 0,r)}function g(...e){const n=Date.now(),c=p(n);if(s=e,i=this,a=n,c){if(void 0===o)return function(e){return l=e,o=setTimeout(m,t),d?u(e):r}(a);if(void 0!==h)return o=setTimeout(m,t),u(a)}return void 0===o&&(o=setTimeout(m,t)),r}return g.cancel=function(){void 0!==o&&clearTimeout(o),l=0,s=a=i=o=void 0},g.flush=function(){return void 0===o?r:f(Date.now())},g},defer(e,...t){return setTimeout(()=>e.apply(this,t),1)},delay(e,t,...n){return setTimeout(()=>e.apply(this,n),t)},flip:e=>function(...t){return e.apply(this,t.reverse())},flow(...e){const t=e.length;return 0===t?function(e){return e}:1===t?e[0]:function(...n){let o=e[0].apply(this,n);for(let n=1;n<t;n++)o=e[n].call(this,o);return o}},compose(...e){return this.flow(...e.reverse())},memoize(e,t){const n=new Map,o=function(...o){const s=t?t.apply(this,o):o[0];if(n.has(s))return n.get(s);const i=e.apply(this,o);return n.set(s,i),i};return o.cache=n,o},negate:e=>function(...t){return!e.apply(this,t)},once(e){return this.before(2,e)},partial:(e,...t)=>function(...n){return e.apply(this,[...t,...n])},partialRight:(e,...t)=>function(...n){return e.apply(this,[...n,...t])},throttle(e,t=0,n={}){const o=!1!==n.leading,s=!1!==n.trailing;return this.debounce(e,t,{leading:o,trailing:s,maxWait:t})},unary(e){return this.ary(e,1)},wrap:(e,t)=>function(...n){return t.apply(this,[e,...n])},assign:(e,...t)=>Object.assign(e||{},...t),assignIn(e,...t){const n=e||{};return t.forEach(e=>{if(e)for(const t in e)n[t]=e[t]}),n},extend(e,...t){return this.assignIn(e,...t)},at(e,...t){return t.flat().map(t=>this.get(e,t))},clone:e=>null===e||"object"!=typeof e?e:Array.isArray(e)?[...e]:{...e},cloneDeep(e){if(null===e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(e=>this.cloneDeep(e));if(e instanceof Date)return new Date(e);if(e instanceof RegExp)return new RegExp(e);const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=this.cloneDeep(e[n]));return t},defaults(e,...t){const n=e||{};return t.forEach(e=>{e&&Object.keys(e).forEach(t=>{void 0===n[t]&&(n[t]=e[t])})}),n},defaultsDeep(e,...t){const n=e||{};return t.forEach(e=>{e&&"object"==typeof e&&Object.keys(e).forEach(t=>{const o=n[t],s=e[t];void 0===o?n[t]=this.cloneDeep(s):o&&"object"==typeof o&&s&&"object"==typeof s&&!Array.isArray(o)&&!Array.isArray(s)&&this.defaultsDeep(o,s)})}),n},entries:e=>e?Object.entries(e):[],toPairs(e){return this.entries(e)},findKey(e,t){if(e)for(const n of Object.keys(e))if(t(e[n],n,e))return n},findLastKey(e,t){if(!e)return;const n=Object.keys(e).reverse();for(const o of n)if(t(e[o],o,e))return o},forIn(e,t){if(e)for(const n in e)if(!1===t(e[n],n,e))break;return e},forOwn(e,t){if(e)for(const n of Object.keys(e))if(!1===t(e[n],n,e))break;return e},get(e,t,n){if(!e)return n;const o=Array.isArray(t)?t:t.replace(/\[(\d+)]/g,".$1").split(".");let s=e;for(const e of o){if(null==s)return n;s=s[e]}return void 0===s?n:s},has(e,t){if(!e)return!1;const n=Array.isArray(t)?t:t.replace(/\[(\d+)]/g,".$1").split(".");let o=e;for(const e of n){if(!Object.prototype.hasOwnProperty.call(o,e))return!1;o=o[e]}return!0},invert(e){const t={};return e&&Object.entries(e).forEach(([e,n])=>{t[n]=e}),t},invertBy(e,t=e=>e){const n={};return e&&Object.entries(e).forEach(([e,o])=>{const s=t(o);n[s]||(n[s]=[]),n[s].push(e)}),n},keys:e=>e?Object.keys(e):[],keysIn(e){const t=[];for(const n in e)t.push(n);return t},mapKeys(e,t){const n={};return e&&Object.entries(e).forEach(([o,s])=>{n[t(s,o,e)]=s}),n},mapValues(e,t){const n={};return e&&Object.entries(e).forEach(([o,s])=>{n[o]=t(s,o,e)}),n},merge(e,...t){const n=e||{};return t.forEach(e=>{e&&"object"==typeof e&&Object.keys(e).forEach(t=>{const o=n[t],s=e[t];o&&"object"==typeof o&&s&&"object"==typeof s&&!Array.isArray(o)&&!Array.isArray(s)?this.merge(o,s):n[t]=s})}),n},omit(e,...t){if(!e)return{};const n=new Set(t.flat()),o={};return Object.keys(e).forEach(t=>{n.has(t)||(o[t]=e[t])}),o},omitBy(e,t){if(!e)return{};const n={};return Object.entries(e).forEach(([e,o])=>{t(o,e)||(n[e]=o)}),n},pick(e,...t){if(!e)return{};const n=new Set(t.flat()),o={};return n.forEach(t=>{t in e&&(o[t]=e[t])}),o},pickBy(e,t){if(!e)return{};const n={};return Object.entries(e).forEach(([e,o])=>{t(o,e)&&(n[e]=o)}),n},set(e,t,n){if(!e)return e;const o=Array.isArray(t)?t:t.replace(/\[(\d+)]/g,".$1").split(".");let s=e;for(let e=0;e<o.length-1;e++){const t=o[e],n=o[e+1];t in s&&null!==s[t]&&"object"==typeof s[t]||(s[t]=/^\d+$/.test(n)?[]:{}),s=s[t]}return s[o[o.length-1]]=n,e},unset(e,t){if(!e)return!0;const n=Array.isArray(t)?t:t.replace(/\[(\d+)]/g,".$1").split(".");let o=e;for(let e=0;e<n.length-1;e++){const t=n[e];if(!(t in o))return!0;o=o[t]}return delete o[n[n.length-1]]},setIfUndefined(e,t,n){return void 0===this.get(e,t)&&this.set(e,t,n),e},values:e=>e?Object.values(e):[],valuesIn(e){const t=[];for(const n in e)t.push(e[n]);return t},isArray:e=>Array.isArray(e),isBoolean:e=>"boolean"==typeof e||e instanceof Boolean,isDate:e=>e instanceof Date,isEmpty:e=>null==e||(Array.isArray(e)||"string"==typeof e?0===e.length:e instanceof Map||e instanceof Set?0===e.size:"object"!=typeof e||0===Object.keys(e).length),isEqual(e,t){if(e===t)return!0;if(null===e||null===t)return e===t;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((e,n)=>this.isEqual(e,t[n]));if(Array.isArray(e)||Array.isArray(t))return!1;const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&n.every(n=>this.isEqual(e[n],t[n]))},isMatch(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if("object"!=typeof e||"object"!=typeof t)return!1;const n=Object.keys(t);for(const o of n){const n=e[o],s=t[o];if("object"==typeof s&&null!==s){if(!this.isMatch(n,s))return!1}else if(n!==s)return!1}return!0},isFinite:e=>Number.isFinite(e),isFunction:e=>"function"==typeof e,isInteger:e=>Number.isInteger(e),isNaN:e=>Number.isNaN(e),isNil:e=>null==e,isNull:e=>null===e,isNumber:e=>"number"==typeof e||e instanceof Number,isObject:e=>null!==e&&"object"==typeof e,isPlainObject(e){if(null===e||"object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype},isRegExp:e=>e instanceof RegExp,isString:e=>"string"==typeof e||e instanceof String,isSymbol:e=>"symbol"==typeof e,isUndefined:e=>void 0===e,parseInt:(e,t)=>(void 0===t&&(t=/^0x/i.test(e)?16:10),null==e?NaN:"number"==typeof e?Math.trunc(e):(e=String(e).trim(),parseInt(e,t))),toNumber(e){if("number"==typeof e)return e;if("symbol"==typeof e)return NaN;if(this.isObject(e)){const t="function"==typeof e.valueOf?e.valueOf():e;e=this.isObject(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.trim();const t=/^0b[01]+$/i.test(e),n=/^0o[0-7]+$/i.test(e),o=/^[-+]0x[0-9a-f]+$/i.test(e);return t||n?parseInt(e.slice(2),t?2:8):o?NaN:+e},toInteger(e){const t=this.toNumber(e);return Number.isNaN(t)?0:0!==t&&Number.isFinite(t)?Math.trunc(t):t},toFinite(e){const t=17976931348623157e292;if(!e)return 0===e?e:0;const n=this.toNumber(e);return n===1/0?t:n===-1/0?-t:n==n?n:0},toSafeInteger(e){const t=9007199254740991,n=this.toInteger(e);return n<-9007199254740991?-9007199254740991:n>t?t:n},toString(e){if(null==e)return"";if("string"==typeof e)return e;if(Array.isArray(e))return e.map(e=>null==e?"":this.toString(e)).join(",");if("symbol"==typeof e)return e.toString();const t=String(e);return"0"===t&&1/e==-1/0?"-0":t},toArray(e){return e?this.isArray(e)?[...e]:"string"==typeof e?e.split(""):this.isObject(e)?"function"==typeof e[Symbol.iterator]?[...e]:Object.values(e):[]:[]},castArray(...e){if(!e.length)return[];const t=e[0];return this.isArray(t)?t:[t]},toLength(e){const t=4294967295,n=this.toInteger(e);return n<0?0:n>t?t:n},toPlainObject(e){const t={};for(const n in e)t[n]=e[n];return t},add:(e,t)=>e+t,ceil(e,t=0){const n=Math.pow(10,t);return Math.ceil(e*n)/n},divide:(e,t)=>e/t,floor(e,t=0){const n=Math.pow(10,t);return Math.floor(e*n)/n},max:e=>e&&e.length?Math.max(...e):void 0,maxBy(e,t){if(e&&e.length)return e.reduce((e,n)=>("function"==typeof t?t(n):n[t])>("function"==typeof t?t(e):e[t])?n:e)},mean(e){return e&&e.length?this.sum(e)/e.length:NaN},meanBy(e,t){return e&&e.length?this.sumBy(e,t)/e.length:NaN},min:e=>e&&e.length?Math.min(...e):void 0,minBy(e,t){if(e&&e.length)return e.reduce((e,n)=>("function"==typeof t?t(n):n[t])<("function"==typeof t?t(e):e[t])?n:e)},multiply:(e,t)=>e*t,round(e,t=0){const n=Math.pow(10,t);return Math.round(e*n)/n},subtract:(e,t)=>e-t,sum:e=>e?e.reduce((e,t)=>e+t,0):0,sumBy:(e,t)=>e?e.reduce((e,n)=>e+("function"==typeof t?t(n):n[t]),0):0,clamp:(e,t,n)=>(void 0===n&&(n=t,t=void 0),void 0!==t&&e<t?t:void 0!==n&&e>n?n:e),inRange:(e,t,n)=>(void 0===n&&(n=t,t=0),t>n&&([t,n]=[n,t]),e>=t&&e<n),random:(e=0,t=1,n)=>("boolean"==typeof e?(n=e,e=0,t=1):"boolean"==typeof t&&(n=t,t=e,e=0),e>t&&([e,t]=[t,e]),n||e%1!=0||t%1!=0?e+Math.random()*(t-e):e+Math.floor(Math.random()*(t-e+1))),camelCase:e=>e?e.replace(/[^a-zA-Z0-9]+(.)/g,(e,t)=>t.toUpperCase()).replace(/^[A-Z]/,e=>e.toLowerCase()):"",capitalize:e=>e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():"",endsWith:(e,t,n)=>!!e&&(void 0!==n?e.slice(0,n).endsWith(t):e.endsWith(t)),escape(e){if(!e)return"";const t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};return e.replace(/[&<>"']/g,e=>t[e])},kebabCase:e=>e?e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase():"",lowerCase(e){return e?this.words(e).join(" ").toLowerCase():""},lowerFirst:e=>e?e.charAt(0).toLowerCase()+e.slice(1):"",pad(e="",t=0,n=" "){const o=e.length;if(o>=t)return e;const s=t-o,i=Math.floor(s/2),r=s-i;return n.repeat(Math.ceil(i/n.length)).slice(0,i)+e+n.repeat(Math.ceil(r/n.length)).slice(0,r)},padEnd(e="",t=0,n=" "){const o=e.length;if(o>=t)return e;const s=t-o;return e+n.repeat(Math.ceil(s/n.length)).slice(0,s)},padStart(e="",t=0,n=" "){const o=e.length;if(o>=t)return e;const s=t-o;return n.repeat(Math.ceil(s/n.length)).slice(0,s)+e},repeat:(e="",t=1)=>e.repeat(Math.max(0,Math.floor(t))),replace:(e="",t,n)=>e.replace(t,n),snakeCase(e){return e?this.words(e).join("_").toLowerCase():""},split:(e="",t,n)=>e.split(t,n),startCase(e){return e?this.words(e).map(e=>this.capitalize(e)).join(" "):""},startsWith:(e,t,n=0)=>!!e&&e.startsWith(t,n),toLower:e=>e?e.toLowerCase():"",toUpper:e=>e?e.toUpperCase():"",trim(e="",t){if(!t)return e.trim();const n=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return e.replace(new RegExp(`^[${n}]+|[${n}]+$`,"g"),"")},trimEnd(e="",t){if(!t)return e.trimEnd();const n=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return e.replace(new RegExp(`[${n}]+$`,"g"),"")},trimStart(e="",t){if(!t)return e.trimStart();const n=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return e.replace(new RegExp(`^[${n}]+`,"g"),"")},truncate(e="",t={}){const n=t.length||30,o=t.omission||"...",s=t.separator;if(e.length<=n)return e;let i=n-o.length;if(i<1)return o;let r=e.slice(0,i);if(s){const e="string"==typeof s?r.lastIndexOf(s):r.search(new RegExp(s.source+"(?!.*"+s.source+")"));e>-1&&(r=r.slice(0,e))}return r+o},unescape(e){if(!e)return"";const t={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"};return e.replace(/&(?:amp|lt|gt|quot|#39);/g,e=>t[e])},upperCase(e){return e?this.words(e).join(" ").toUpperCase():""},upperFirst:e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",words:(e="",t)=>t?e.match(t)||[]:(e=e.replace(/([a-z])([A-Z])/g,"$1 $2")).match(/[a-zA-Z0-9]+/g)||[],sprintf(e,...t){if(!e)return"";let n=0;return e.replace(/%(?:(\d+)\$)?([+-])?(\d+)?(?:\.(\d+))?([sdifojx%])/g,(e,o,s,i,r,a)=>{if("%"===a)return"%";const l=o?parseInt(o,10)-1:n++,d=t[l];if(void 0===d)return e;if(null===d)return"null";let c;switch(a){case"s":default:c=String(d);break;case"d":case"i":c=String(parseInt(d,10));break;case"f":const e=parseFloat(d);c=void 0!==r?e.toFixed(parseInt(r,10)):String(e);break;case"o":c=Object.prototype.toString.call(d);break;case"j":try{c=JSON.stringify(d)}catch(e){c="[Circular]"}break;case"x":c=parseInt(d,10).toString(16)}if(i){const e=parseInt(i,10),t="0"===s?"0":" ";c="-"===s?c.padEnd(e," "):c.padStart(e,t)}if("+"===s&&("d"===a||"i"===a||"f"===a)){parseFloat(c)>=0&&!c.startsWith("+")&&(c="+"+c)}return c})},format(e,...t){return this.sprintf(e,...t)},template(e,t={}){const{partials:n={},helpers:o={}}=t,s=e=>null==e?"":String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"),i=(e,t)=>"."===t?e:t.startsWith("@")?e[t]:t.split(".").reduce((e,t)=>e&&void 0!==e[t]?e[t]:"",e),r=(e,t,a=null)=>{let l=e;return l=l.replace(/\{\{#with\s+([^}]+)\}\}([\s\S]*?)\{\{\/with\}\}/g,(e,n,o)=>{const s=i(t,n.trim());return s&&"object"==typeof s?r(o,s,t):""}),l=l.replace(/\{\{#each\s+([^}]+)\}\}([\s\S]*?)\{\{\/each\}\}/g,(e,n,o)=>{const s=i(t,n.trim());return Array.isArray(s)?s.map((e,n)=>{const i="object"==typeof e?{...e,"@index":n,"@first":0===n,"@last":n===s.length-1}:{".":e,"@index":n,"@first":0===n,"@last":n===s.length-1};return r(o,i,t)}).join(""):""}),l=l.replace(/\{\{#if\s+([^}]+)\}\}([\s\S]*?)(?:\{\{else\}\}([\s\S]*?))?\{\{\/if\}\}/g,(e,n,o,s="")=>{const l=i(t,n.trim()),d=Array.isArray(l)?l.length>0:Boolean(l);return r(d?o:s,t,a)}),l=l.replace(/\{\{#unless\s+([^}]+)\}\}([\s\S]*?)\{\{\/unless\}\}/g,(e,n,o)=>{const s=i(t,n.trim());return(Array.isArray(s)?0===s.length:!s)?r(o,t,a):""}),l=l.replace(/\{\{>\s*([^}]+)\}\}/g,(e,o)=>{const s=n[o.trim()];return s?r(s,t,a):""}),l=l.replace(/\{\{\{([^}]+)\}\}\}/g,(e,n)=>{const o=i(t,n.trim());return null!=o?String(o):""}),l=l.replace(/\{\{([^#/>][^}]*)\}\}/g,(e,n)=>{const r=n.trim(),a=r.match(/^(\w+)\s+(.+)$/);if(a&&o[a[1]]){const e=a[2].split(/\s+/).map(e=>/^["'].*["']$/.test(e)?e.slice(1,-1):i(t,e));return s(o[a[1]](...e))}const l=i(t,r);return s(l)}),l};return(t={})=>r(e,t)},render(e,t,n={}){return this.template(e,n)(t)},async copyToClipboard(e){if(navigator.clipboard?.writeText)try{return await navigator.clipboard.writeText(e),!0}catch(e){}const t=document.createElement("textarea");t.value=e,t.style.cssText="position:fixed;opacity:0;pointer-events:none",document.body.appendChild(t),t.select();try{return document.execCommand("copy")}catch(e){return!1}finally{document.body.removeChild(t)}},escapeHtml:e=>null==e?"":String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"),chain(e){const t={_value:e,value(){return this._value}};["chunk","compact","concat","difference","drop","dropRight","fill","findIndex","findLastIndex","flatten","flattenDeep","flattenDepth","fromPairs","head","indexOf","initial","intersection","join","last","lastIndexOf","nth","pull","pullAll","pullAt","remove","reverse","slice","sortedIndex","sortedUniq","tail","take","takeRight","union","uniq","uniqBy","unzip","without","xor","zip","countBy","each","every","filter","find","findLast","flatMap","groupBy","includes","invokeMap","keyBy","map","orderBy","partition","reduce","reduceRight","reject","sample","sampleSize","shuffle","size","some","sortBy","assign","assignIn","at","defaults","entries","extend","findKey","findLastKey","forIn","forOwn","functions","get","has","invert","invertBy","invoke","keys","mapKeys","mapValues","merge","omit","omitBy","pick","pickBy","result","set","toPairs","transform","unset","update","values","camelCase","capitalize","deburr","endsWith","escape","escapeRegExp","kebabCase","lowerCase","lowerFirst","pad","padEnd","padStart","parseInt","repeat","replace","snakeCase","split","startCase","startsWith","toLower","toUpper","trim","trimEnd","trimStart","truncate","unescape","upperCase","upperFirst","words"].forEach(e=>{"function"==typeof this[e]&&(t[e]=function(...t){return this._value=c[e](this._value,...t),this})});return["sum","mean","min","max","toArray","toJSON","toString"].forEach(e=>{"function"==typeof this[e]&&(t[e]=function(...t){return c[e](this._value,...t)})}),t}};class h{constructor(e,t={}){this.element="string"==typeof e?document.querySelector(e):e,this.options={...this.constructor.defaults,...t},this._eventHandlers=[],this.element&&(this.element._dommaComponent=this)}on(e,t){this.options[e]&&"function"==typeof this.options[e]&&this.options[e](t)}setOptions(e){return this.options={...this.options,...e},"function"==typeof this._applyOptions&&this._applyOptions(),this}_addEventListener(e,t,n){e.addEventListener(t,n),this._eventHandlers.push({element:e,event:t,handler:n})}destroy(){for(const{element:e,event:t,handler:n}of this._eventHandlers)e.removeEventListener(t,n);this._eventHandlers=[],this.element&&delete this.element._dommaComponent}}class u extends h{static defaults={data:[],idKey:"id",parentKey:"parent_id",childrenKey:"children",labelKey:"name",iconKey:"icon",colorKey:"color",expandedByDefault:!0,expandedNodes:[],selectable:!0,multiSelect:!1,selectedNodes:[],renderNode:null,getBadge:null,getNodeIcon:null,getNodeClass:null,actions:[],indentSize:1.5,showIcons:!0,showToggleButtons:!0,toggleIcon:"chevron-down",onSelect:null,onDeselect:null,onExpand:null,onCollapse:null,onAction:null,onClick:null};constructor(e,t={}){super(e,t),this.element?(this._tree=[],this._flatMap={},this._expandedNodes=new Set,this._selectedNodes=new Set,this._init()):console.error("TreeView: Element not found",e)}_init(){this.element.classList.contains("dm-treeview")||this.element.classList.add("dm-treeview"),this.options.expandedNodes.length>0&&this.options.expandedNodes.forEach(e=>this._expandedNodes.add(e)),this.options.selectedNodes.length>0&&this.options.selectedNodes.forEach(e=>this._selectedNodes.add(e)),this.options.data&&this.options.data.length>0&&this.setData(this.options.data),this._setupEventListeners()}_setupEventListeners(){this._addEventListener(this.element,"click",e=>{const t=e.target.closest(".dm-treeview-node");if(!t||e.target.closest(".dm-treeview-toggle")||e.target.closest(".dm-treeview-action"))return;const n=this._parseNodeId(t.dataset.nodeId);this._handleSelect(n,e)}),this._addEventListener(this.element,"click",e=>{const t=e.target.closest(".dm-treeview-toggle");if(t){e.stopPropagation();const n=this._parseNodeId(t.dataset.nodeId);this.toggle(n)}}),this._addEventListener(this.element,"click",e=>{const t=e.target.closest(".dm-treeview-action");if(t){e.stopPropagation();const n=this._parseNodeId(t.dataset.nodeId),o=t.dataset.action;this._handleAction(o,n,e)}})}_buildTree(e){const t={},n=[],o=this.options.idKey,s=this.options.parentKey,i=this.options.childrenKey;return e.forEach(e=>{t[e[o]]={...e,[i]:[]}}),e.forEach(e=>{const r=t[e[o]],a=e[s];null==a?n.push(r):t[a]?t[a][i].push(r):n.push(r)}),this._sortTree(n),{tree:n,nodeMap:t}}_sortTree(e){const t=this.options.childrenKey,n=this.options.labelKey;e.sort((e,t)=>{const o=(e[n]||"").toLowerCase(),s=(t[n]||"").toLowerCase();return o.localeCompare(s)}),e.forEach(e=>{e[t]&&e[t].length>0&&this._sortTree(e[t])})}_render(){const e=this._tree.map(e=>this._renderNode(e,0)).join("");this.element.innerHTML=e}_renderNode(e,t){const n=this.options.idKey,o=this.options.childrenKey,s=e[n],i=e[o]&&e[o].length>0,r=this._expandedNodes.has(s),a=this._selectedNodes.has(s),l={isExpanded:r,isSelected:a,hasChildren:i},d=this.options.renderNode?this.options.renderNode(e,t,l):this._defaultRenderNode(e,t,l),c=this.options.getBadge?this.options.getBadge(e):null;let h=`\n <div class="dm-treeview-node ${a?"dm-treeview-node-selected":""} ${this.options.getNodeClass?this.options.getNodeClass(e):""}"\n data-node-id="${s}"\n data-depth="${t}"\n style="padding-left: ${t*this.options.indentSize}rem;">\n <div class="dm-treeview-node-content">\n ${i&&this.options.showToggleButtons?this._renderToggle(s,r):'<span class="dm-treeview-spacer"></span>'}\n ${d}\n ${null!=c?`<span class="dm-treeview-badge">${c}</span>`:""}\n </div>\n ${this.options.actions.length>0?this._renderActions(e):""}\n </div>\n `;return i&&r&&(h+=`<div class="dm-treeview-children" data-parent-id="${s}">`,e[o].forEach(e=>{h+=this._renderNode(e,t+1)}),h+="</div>"),h}_defaultRenderNode(e,t,n){const o=this.options.labelKey,s=this.options.iconKey,i=this.options.colorKey,r=e[o]||"",a=this.options.getNodeIcon?this.options.getNodeIcon(e):e[s],l=e[i];let d="";return this.options.showIcons&&a&&(d+=`<span class="dm-treeview-icon" data-icon="${a}" ${l?`style="color: ${l};"`:""}></span>`),d+=`<span class="dm-treeview-label">${this._escapeHtml(r)}</span>`,d}_renderToggle(e,t){return`\n <button type="button"\n class="dm-treeview-toggle ${t?"dm-treeview-expanded":"dm-treeview-collapsed"}"\n data-node-id="${e}"\n aria-label="${t?"Collapse":"Expand"}">\n <span data-icon="${this.options.toggleIcon}"></span>\n </button>\n `}_renderActions(e){const t=e[this.options.idKey],n=this.options.actions.filter(t=>"function"!=typeof t.visible||t.visible(e));if(0===n.length)return"";let o='<div class="dm-treeview-actions">';return n.forEach(e=>{o+=`\n <button type="button"\n class="dm-treeview-action"\n data-node-id="${t}"\n data-action="${e.name}"\n title="${e.tooltip||e.name}"\n aria-label="${e.tooltip||e.name}">\n ${e.icon?`<span data-icon="${e.icon}"></span>`:e.name}\n </button>\n `}),o+="</div>",o}_handleSelect(e,t){if(!this.options.selectable)return;const n=this._flatMap[e];if(!n)return;"function"==typeof this.options.onClick&&this.options.onClick(e,n,t);const o=this._selectedNodes.has(e);this.options.multiSelect?o?this.deselect(e):this.select(e):o?this.deselect(e):(this.deselectAll(!0),this.select(e))}_handleAction(e,t,n){const o=this._flatMap[t];o&&"function"==typeof this.options.onAction&&this.options.onAction(e,t,o,n)}_parseNodeId(e){const t=Number(e);return isNaN(t)||e!==t.toString()?e:t}_escapeHtml(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}setData(e){const{tree:t,nodeMap:n}=this._buildTree(e);return this._tree=t,this._flatMap=n,this.options.expandedByDefault&&Object.keys(n).forEach(e=>{const t=n[e],o=this.options.childrenKey;t[o]&&t[o].length>0&&this._expandedNodes.add(this._parseNodeId(e))}),this._render(),this}getData(){return this._tree}getFlatData(){return Object.values(this._flatMap)}refresh(){return this._render(),"undefined"!=typeof window&&window.Domma&&window.Domma.icons&&window.Domma.icons.scan(this.element),this}getNode(e){return this._flatMap[e]||null}updateNode(e,t){const n=this._flatMap[e];return n&&(Object.assign(n,t),this.refresh()),this}select(e,t=!1){if(!this.options.selectable)return this;const n=this._flatMap[e];return n?(this._selectedNodes.add(e),this.refresh(),t||"function"!=typeof this.options.onSelect||this.options.onSelect(e,n,null),this):this}deselect(e,t=!1){const n=this._flatMap[e];return n?(this._selectedNodes.delete(e),this.refresh(),t||"function"!=typeof this.options.onDeselect||this.options.onDeselect(e,n,null),this):this}toggleSelect(e){return this._selectedNodes.has(e)?this.deselect(e):this.select(e),this}selectAll(){return this.options.multiSelect?(Object.keys(this._flatMap).forEach(e=>{this._selectedNodes.add(this._parseNodeId(e))}),this.refresh(),this):this}deselectAll(e=!1){const t=Array.from(this._selectedNodes);return this._selectedNodes.clear(),this.refresh(),e||"function"!=typeof this.options.onDeselect||t.forEach(e=>{const t=this._flatMap[e];t&&this.options.onDeselect(e,t,null)}),this}getSelected(){return Array.from(this._selectedNodes)}getSelectedNodes(){return this.getSelected().map(e=>this._flatMap[e]).filter(Boolean)}isSelected(e){return this._selectedNodes.has(e)}expand(e,t=!1){const n=this._flatMap[e];return n?(this._expandedNodes.add(e),this.refresh(),t||"function"!=typeof this.options.onExpand||this.options.onExpand(e,n,null),this):this}collapse(e,t=!1){const n=this._flatMap[e];return n?(this._expandedNodes.delete(e),this.refresh(),t||"function"!=typeof this.options.onCollapse||this.options.onCollapse(e,n,null),this):this}toggle(e){return this._expandedNodes.has(e)?this.collapse(e):this.expand(e),this}expandAll(){return Object.keys(this._flatMap).forEach(e=>{const t=this._flatMap[e],n=this.options.childrenKey;t[n]&&t[n].length>0&&this._expandedNodes.add(this._parseNodeId(e))}),this.refresh(),this}collapseAll(){return this._expandedNodes.clear(),this.refresh(),this}isExpanded(e){return this._expandedNodes.has(e)}getExpanded(){return Array.from(this._expandedNodes)}getParent(e){const t=this._flatMap[e];if(!t)return null;const n=t[this.options.parentKey];return null!=n&&this._flatMap[n]||null}getChildren(e){const t=this._flatMap[e];if(!t)return[];return t[this.options.childrenKey]||[]}getAncestors(e){const t=[];let n=this.getParent(e);for(;n;)t.unshift(n),n=this.getParent(n[this.options.idKey]);return t}getDescendants(e){const t=[];return this.getChildren(e).forEach(e=>{t.push(e);const n=e[this.options.idKey];t.push(...this.getDescendants(n))}),t}getSiblings(e){if(!this._flatMap[e])return[];const t=this.getParent(e);return t?this.getChildren(t[this.options.idKey]).filter(t=>t[this.options.idKey]!==e):this._tree.filter(t=>t[this.options.idKey]!==e)}getLevel(e){return this.getAncestors(e).length}find(e){for(const t in this._flatMap){const n=this._flatMap[t];if(e(n))return n}return null}filter(e){const t=[];for(const n in this._flatMap){const o=this._flatMap[n];e(o)&&t.push(o)}return t}forEach(e){for(const t in this._flatMap)e(this._flatMap[t],t);return this}scrollToNode(e,t={}){const n=this.element.querySelector(`[data-node-id="${e}"]`);return n&&n.scrollIntoView({behavior:t.behavior||"smooth",block:t.block||"center",inline:t.inline||"nearest"}),this}destroy(){this._tree=[],this._flatMap={},this._expandedNodes.clear(),this._selectedNodes.clear(),this.element.innerHTML="",super.destroy()}}class p extends HTMLElement{static defaults={};static get observedAttributes(){return[]}constructor(){super(),this._eventHandlers=[],this._options={},this._initialised=!1,this.attachShadow({mode:"open"})}connectedCallback(){this._initialised||(this._options=this._mergeOptions(),this._onBeforeMount?.(),this._injectStyles(),this._render(),this._bindEvents(),this._initialised=!0),this._onConnect?.()}disconnectedCallback(){this._onBeforeUnmount?.(),this._cleanup(),this._onDisconnect?.()}attributeChangedCallback(e,t,n){t!==n&&this._initialised&&(this._options[this._attrToOption(e)]=this._parseAttrValue(n),this._onAttributeChange?.(e,t,n))}_onBeforeMount(){}_onUpdated(){}_onBeforeUnmount(){}_mergeOptions(){const e={...this.constructor.defaults};for(const t of this.attributes){e[this._attrToOption(t.name)]=this._parseAttrValue(t.value)}return e}_attrToOption(e){return e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}_parseAttrValue(e){if(""===e||"true"===e)return!0;if("false"===e)return!1;if(!isNaN(e)&&""!==e)return Number(e);try{return JSON.parse(e)}catch{return e}}_injectStyles(){const e=document.createElement("style");e.textContent=this._getStyles(),this.shadowRoot.appendChild(e)}_getStyles(){return this.constructor.styles||""}_render(){}_bindEvents(){}_addEventListener(e,t,n,o){e.addEventListener(t,n,o),this._eventHandlers.push({element:e,event:t,handler:n,options:o})}_cleanup(){for(const{element:e,event:t,handler:n,options:o}of this._eventHandlers)e.removeEventListener(t,n,o);this._eventHandlers=[]}_emit(e,t={}){this.dispatchEvent(new CustomEvent(e,{bubbles:!0,composed:!0,detail:t}))}setOptions(e){return this._options={...this._options,...e},"function"==typeof this._applyOptions&&this._applyOptions(),this}destroy(){this._cleanup(),this.remove()}}const m="\n * {\n box-sizing: border-box;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n";class f extends p{static defaults={variant:"primary",size:"medium",pill:!1,outline:!1,removable:!1};static get observedAttributes(){return["variant","size","pill","outline","removable"]}static variants={primary:{bg:"var(--dm-primary, #4f46e5)",color:"#fff"},secondary:{bg:"var(--dm-secondary, #6b7280)",color:"#fff"},success:{bg:"var(--dm-success, #10b981)",color:"#fff"},danger:{bg:"var(--dm-danger, #ef4444)",color:"#fff"},warning:{bg:"var(--dm-warning, #f59e0b)",color:"#000"},info:{bg:"var(--dm-info, #3b82f6)",color:"#fff"},light:{bg:"var(--dm-background-alt, #f3f4f6)",color:"var(--dm-text, #111)"},dark:{bg:"var(--dm-surface-overlay, #1f2937)",color:"var(--dm-white, #fff)"}};static sizes={small:{padding:"2px 6px",fontSize:"10px"},medium:{padding:"4px 10px",fontSize:"12px"},large:{padding:"6px 14px",fontSize:"14px"}};_getStyles(){return`\n \n :host {\n --dm-primary: var(--dm-primary, #6495ED);\n --dm-secondary: var(--dm-secondary, #6c757d);\n --dm-success: var(--dm-success, #28a745);\n --dm-danger: var(--dm-danger, #dc3545);\n --dm-warning: var(--dm-warning, #ffc107);\n --dm-info: var(--dm-info, #17a2b8);\n --dm-white: var(--dm-white, #ffffff);\n --dm-gray-100: var(--dm-gray-100, #f8f9fa);\n --dm-gray-200: var(--dm-gray-200, #e9ecef);\n --dm-gray-300: var(--dm-gray-300, #dee2e6);\n --dm-gray-400: var(--dm-gray-400, #ced4da);\n --dm-gray-500: var(--dm-gray-500, #adb5bd);\n --dm-gray-600: var(--dm-gray-600, #6c757d);\n --dm-gray-700: var(--dm-gray-700, #495057);\n --dm-gray-800: var(--dm-gray-800, #343a40);\n --dm-gray-900: var(--dm-gray-900, #212529);\n --dm-radius-sm: var(--dm-radius-sm, 0.25rem);\n --dm-radius-md: var(--dm-radius-md, 0.375rem);\n --dm-radius-lg: var(--dm-radius-lg, 0.5rem);\n --dm-radius-full: var(--dm-radius-full, 9999px);\n --dm-transition-fast: var(--dm-transition-fast, 150ms);\n --dm-transition-normal: var(--dm-transition-normal, 300ms);\n --dm-transition-slow: var(--dm-transition-slow, 500ms);\n --dm-shadow-sm: var(--dm-shadow-sm, 0 1px 2px 0 rgba(0, 0, 0, 0.05));\n --dm-shadow-md: var(--dm-shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1));\n --dm-shadow-lg: var(--dm-shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));\n --dm-shadow-xl: var(--dm-shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, 0.1));\n }\n \n ${m}\n \n button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n margin: 0;\n border: none;\n background: transparent;\n color: inherit;\n font: inherit;\n cursor: pointer;\n transition: opacity var(--dm-transition-fast);\n }\n\n button:hover {\n opacity: 0.8;\n }\n\n button:focus {\n outline: 2px solid var(--dm-primary);\n outline-offset: 2px;\n }\n\n button:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n\n :host {\n display: inline-flex;\n }\n\n .badge {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-weight: 500;\n line-height: 1;\n transition: all 150ms ease;\n }\n\n .badge-clickable {\n cursor: pointer;\n }\n\n .remove-btn {\n margin-left: 2px;\n width: 14px;\n height: 14px;\n font-size: 16px;\n line-height: 1;\n opacity: 0.7;\n }\n\n .remove-btn:hover {\n opacity: 1;\n }\n `}_render(){const{variant:e,size:t,pill:n,outline:o,removable:s}=this._options,i=f.variants[e]||f.variants.primary,r=f.sizes[t]||f.sizes.medium,a=document.createElement("span");a.className="badge",a.setAttribute("part","badge");const l=n?"9999px":"4px",d=o?"transparent":i.bg,c=o?i.bg:i.color,h=o?`1px solid ${i.bg}`:"none";a.style.cssText=`\n background: ${d};\n color: ${c};\n border: ${h};\n border-radius: ${l};\n padding: ${r.padding};\n font-size: ${r.fontSize};\n `;const u=document.createElement("slot");if(a.appendChild(u),s){const e=document.createElement("button");e.className="remove-btn",e.setAttribute("part","remove-btn"),e.setAttribute("aria-label","Remove"),e.textContent="×",this._addEventListener(e,"click",e=>{e.stopPropagation(),this._emit("remove",{badge:this}),this.remove()}),a.appendChild(e)}this._badge=a,this.shadowRoot.appendChild(a)}_bindEvents(){this._addEventListener(this._badge,"click",e=>{e.target.classList.contains("remove-btn")||this._emit("click",{badge:this,event:e})})}_onAttributeChange(e,t,n){this.shadowRoot.textContent="",this._injectStyles(),this._render(),this._bindEvents()}_applyOptions(){this.shadowRoot.textContent="",this._injectStyles(),this._render(),this._bindEvents()}setVariant(e){return this.setAttribute("variant",e),this}setSize(e){return this.setAttribute("size",e),this}setText(e){return this.textContent=e,this}}customElements.get("domma-badge")||customElements.define("domma-badge",f);class g extends p{static defaults={count:0,variant:"danger",dot:!1,pulse:!1,borderColor:null};static get observedAttributes(){return["count","variant","dot","pulse","border-color"]}static variants={primary:{bg:"var(--dm-primary, #4f46e5)",color:"#fff"},secondary:{bg:"var(--dm-background-alt, #f3f4f6)",color:"var(--dm-text, #111)"},success:{bg:"var(--dm-success, #10b981)",color:"#fff"},danger:{bg:"var(--dm-danger, #ef4444)",color:"#fff"},warning:{bg:"var(--dm-warning, #f59e0b)",color:"#000"},info:{bg:"var(--dm-info, #3b82f6)",color:"#fff"},light:{bg:"var(--dm-background-alt, #f3f4f6)",color:"var(--dm-text, #111)"},dark:{bg:"var(--dm-surface-overlay, #1f2937)",color:"#fff"}};_getStyles(){return`\n \n :host {\n --dm-primary: var(--dm-primary, #6495ED);\n --dm-secondary: var(--dm-secondary, #6c757d);\n --dm-success: var(--dm-success, #28a745);\n --dm-danger: var(--dm-danger, #dc3545);\n --dm-warning: var(--dm-warning, #ffc107);\n --dm-info: var(--dm-info, #17a2b8);\n --dm-white: var(--dm-white, #ffffff);\n --dm-gray-100: var(--dm-gray-100, #f8f9fa);\n --dm-gray-200: var(--dm-gray-200, #e9ecef);\n --dm-gray-300: var(--dm-gray-300, #dee2e6);\n --dm-gray-400: var(--dm-gray-400, #ced4da);\n --dm-gray-500: var(--dm-gray-500, #adb5bd);\n --dm-gray-600: var(--dm-gray-600, #6c757d);\n --dm-gray-700: var(--dm-gray-700, #495057);\n --dm-gray-800: var(--dm-gray-800, #343a40);\n --dm-gray-900: var(--dm-gray-900, #212529);\n --dm-radius-sm: var(--dm-radius-sm, 0.25rem);\n --dm-radius-md: var(--dm-radius-md, 0.375rem);\n --dm-radius-lg: var(--dm-radius-lg, 0.5rem);\n --dm-radius-full: var(--dm-radius-full, 9999px);\n --dm-transition-fast: var(--dm-transition-fast, 150ms);\n --dm-transition-normal: var(--dm-transition-normal, 300ms);\n --dm-transition-slow: var(--dm-transition-slow, 500ms);\n --dm-shadow-sm: var(--dm-shadow-sm, 0 1px 2px 0 rgba(0, 0, 0, 0.05));\n --dm-shadow-md: var(--dm-shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1));\n --dm-shadow-lg: var(--dm-shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));\n --dm-shadow-xl: var(--dm-shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, 0.1));\n }\n \n ${m}\n\n :host {\n position: relative;\n display: inline-flex;\n }\n\n .counter {\n position: absolute;\n top: -6px;\n right: -8px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 1.25rem;\n height: 1.25rem;\n padding: 0 0.3em;\n font-size: 0.65rem;\n font-weight: 700;\n font-variant-numeric: tabular-nums;\n line-height: 1;\n border-radius: 9999px;\n border: 2px solid var(--dm-background, #fff);\n z-index: 1;\n transition: transform 150ms ease;\n }\n\n .counter.dot {\n top: -2px;\n right: -2px;\n min-width: 0.5rem;\n height: 0.5rem;\n padding: 0;\n }\n\n .counter.hidden {\n display: none;\n }\n\n @keyframes badge-pulse {\n 0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }\n 50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }\n }\n\n .counter.pulse {\n animation: badge-pulse 2s ease-in-out infinite;\n }\n `}_render(){const{count:e,variant:t,dot:n,pulse:o,borderColor:s}=this._options,i=g.variants[t]||g.variants.danger,r=document.createElement("slot"),a=document.createElement("span");a.className="counter",a.setAttribute("part","counter"),a.setAttribute("aria-live","polite"),a.setAttribute("role","status"),a.style.backgroundColor=i.bg,a.style.color=i.color,s&&(a.style.borderColor=s),n?(a.classList.add("dot"),a.textContent=""):a.textContent=String(e),o&&a.classList.add("pulse"),n||0!==Number(e)||a.classList.add("hidden"),this._counter=a,this.shadowRoot.appendChild(r),this.shadowRoot.appendChild(a)}_onAttributeChange(e,t,n){this.shadowRoot.textContent="",this._injectStyles(),this._render()}_applyOptions(){this.shadowRoot.textContent="",this._injectStyles(),this._render()}setCount(e){return this._options.count=Number(e),this.setAttribute("count",String(e)),this}increment(e=1){const t=(Number(this._options.count)||0)+e;return this.setCount(t),this}decrement(e=1){const t=Math.max(0,(Number(this._options.count)||0)-e);return this.setCount(t),this}setDot(e){return this._options.dot=e,e?this.setAttribute("dot",""):this.removeAttribute("dot"),this}setVariant(e){return this.setAttribute("variant",e),this}setPulse(e){return this._options.pulse=e,e?this.setAttribute("pulse",""):this.removeAttribute("pulse"),this}getCount(){return Number(this._options.count)||0}}customElements.get("domma-number-badge")||customElements.define("domma-number-badge",g);class v extends p{static defaults={content:"",position:"top",trigger:"hover",delay:0,hideDelay:0,animation:!0,offset:8,html:!1,visible:!1};static get observedAttributes(){return["content","position","trigger","delay","hide-delay","animation","offset","html","visible"]}constructor(){super(),this._tooltip=null,this._isVisible=!1,this._showTimeout=null,this._hideTimeout=null}_injectStyles(){const e=document.createElement("style");e.textContent='\n \n :host {\n --dm-primary: var(--dm-primary, #6495ED);\n --dm-secondary: var(--dm-secondary, #6c757d);\n --dm-success: var(--dm-success, #28a745);\n --dm-danger: var(--dm-danger, #dc3545);\n --dm-warning: var(--dm-warning, #ffc107);\n --dm-info: var(--dm-info, #17a2b8);\n --dm-white: var(--dm-white, #ffffff);\n --dm-gray-100: var(--dm-gray-100, #f8f9fa);\n --dm-gray-200: var(--dm-gray-200, #e9ecef);\n --dm-gray-300: var(--dm-gray-300, #dee2e6);\n --dm-gray-400: var(--dm-gray-400, #ced4da);\n --dm-gray-500: var(--dm-gray-500, #adb5bd);\n --dm-gray-600: var(--dm-gray-600, #6c757d);\n --dm-gray-700: var(--dm-gray-700, #495057);\n --dm-gray-800: var(--dm-gray-800, #343a40);\n --dm-gray-900: var(--dm-gray-900, #212529);\n --dm-radius-sm: var(--dm-radius-sm, 0.25rem);\n --dm-radius-md: var(--dm-radius-md, 0.375rem);\n --dm-radius-lg: var(--dm-radius-lg, 0.5rem);\n --dm-radius-full: var(--dm-radius-full, 9999px);\n --dm-transition-fast: var(--dm-transition-fast, 150ms);\n --dm-transition-normal: var(--dm-transition-normal, 300ms);\n --dm-transition-slow: var(--dm-transition-slow, 500ms);\n --dm-shadow-sm: var(--dm-shadow-sm, 0 1px 2px 0 rgba(0, 0, 0, 0.05));\n --dm-shadow-md: var(--dm-shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1));\n --dm-shadow-lg: var(--dm-shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));\n --dm-shadow-xl: var(--dm-shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, 0.1));\n }\n \n\n :host {\n display: contents;\n }\n\n .tooltip-wrapper {\n position: relative;\n display: inline-block;\n }\n\n .tooltip {\n position: fixed;\n z-index: 1000;\n padding: 0.5rem 0.75rem;\n background: var(--dm-text, #212529);\n color: var(--dm-surface, #fff);\n border-radius: 4px;\n font-size: 0.875rem;\n line-height: 1.4;\n max-width: 250px;\n pointer-events: none;\n opacity: 0;\n transition: opacity 0.15s ease;\n box-shadow: 0 2px 8px rgba(0,0,0,0.15);\n }\n\n .tooltip.show {\n opacity: 1;\n }\n\n /* Arrow */\n .tooltip::before {\n content: \'\';\n position: absolute;\n width: 0;\n height: 0;\n border: 5px solid transparent;\n }\n\n .tooltip[data-position="top"]::before {\n bottom: -10px;\n left: 50%;\n transform: translateX(-50%);\n border-top-color: var(--dm-text, #212529);\n }\n\n .tooltip[data-position="bottom"]::before {\n top: -10px;\n left: 50%;\n transform: translateX(-50%);\n border-bottom-color: var(--dm-text, #212529);\n }\n\n .tooltip[data-position="left"]::before {\n right: -10px;\n top: 50%;\n transform: translateY(-50%);\n border-left-color: var(--dm-text, #212529);\n }\n\n .tooltip[data-position="right"]::before {\n left: -10px;\n top: 50%;\n transform: translateY(-50%);\n border-right-color: var(--dm-text, #212529);\n }\n ',this.shadowRoot.appendChild(e)}_render(){const e=document.createElement("div");e.className="tooltip-wrapper",e.setAttribute("part","wrapper");const t=document.createElement("slot");e.appendChild(t),this.shadowRoot.appendChild(e),this._wrapper=e}_bindEvents(){const{trigger:e}=this._options;"hover"===e?(this._addEventListener(this._wrapper,"mouseenter",()=>this.show()),this._addEventListener(this._wrapper,"mouseleave",()=>this.hide())):"click"===e?this._addEventListener(this._wrapper,"click",()=>this.toggle()):"focus"===e&&(this._addEventListener(this._wrapper,"focusin",()=>this.show()),this._addEventListener(this._wrapper,"focusout",()=>this.hide()))}_onAttributeChange(e,t,n){switch(e){case"content":this._tooltip&&this._isVisible&&this._updateTooltipContent();break;case"position":this._tooltip&&this._isVisible&&this._positionTooltip();break;case"trigger":this._cleanup(),this._bindEvents();break;case"visible":""===n||"true"===n?this.show():this.hide()}}_onConnect(){this._options.visible&&this.show()}_onDisconnect(){clearTimeout(this._showTimeout),clearTimeout(this._hideTimeout),this._tooltip&&(this._tooltip.remove(),this._tooltip=null)}show(){if(clearTimeout(this._hideTimeout),this._isVisible)return this;const{delay:e}=this._options;return this._showTimeout=setTimeout(()=>{this._createTooltip(),this._positionTooltip(),this._emit("show")},e),this}hide(){if(clearTimeout(this._showTimeout),!this._isVisible)return this;const{hideDelay:e}=this._options;return this._hideTimeout=setTimeout(()=>{this._tooltip&&(this._tooltip.classList.remove("show"),this._tooltip.style.opacity="0",setTimeout(()=>{this._tooltip&&(this._tooltip.remove(),this._tooltip=null),this._isVisible=!1,this._emit("hide")},150))},e),this}toggle(){return this._isVisible?this.hide():this.show()}isVisible(){return this._isVisible}setContent(e){return this.setAttribute("content",e),this}setPosition(e){return this.setAttribute("position",e),this}_createTooltip(){const{content:e,position:t,html:n}=this._options;if(this._tooltip=document.createElement("div"),this._tooltip.className="domma-tooltip",this._tooltip.setAttribute("data-position",t),this._applyTooltipStyles(),n){const t="undefined"!=typeof DOMPurify?DOMPurify.sanitize(e):e;this._tooltip.innerHTML=t}else this._tooltip.textContent=e;document.body.appendChild(this._tooltip),this._tooltip.offsetHeight,this._tooltip.classList.add("show"),this._tooltip.style.opacity="1",this._isVisible=!0}_applyTooltipStyles(){Object.assign(this._tooltip.style,{position:"fixed",zIndex:"1000",padding:"0.5rem 0.75rem",background:"var(--dm-text, #212529)",color:"var(--dm-surface, #fff)",borderRadius:"4px",fontSize:"0.875rem",lineHeight:"1.4",maxWidth:"250px",pointerEvents:"none",transition:"opacity 0.15s ease",boxShadow:"0 2px 8px rgba(0,0,0,0.15)"}),this._tooltip.style.opacity="0",this._injectGlobalTooltipStyles()}_injectGlobalTooltipStyles(){if(document.getElementById("domma-tooltip-styles"))return;const e=document.createElement("style");e.id="domma-tooltip-styles",e.textContent='\n .domma-tooltip.show {\n opacity: 1 !important;\n }\n\n /* Arrow */\n .domma-tooltip::before {\n content: \'\';\n position: absolute;\n width: 0;\n height: 0;\n border: 5px solid transparent;\n }\n\n .domma-tooltip[data-position="top"]::before {\n bottom: -10px;\n left: 50%;\n transform: translateX(-50%);\n border-top-color: var(--dm-text, #212529);\n }\n\n .domma-tooltip[data-position="bottom"]::before {\n top: -10px;\n left: 50%;\n transform: translateX(-50%);\n border-bottom-color: var(--dm-text, #212529);\n }\n\n .domma-tooltip[data-position="left"]::before {\n right: -10px;\n top: 50%;\n transform: translateY(-50%);\n border-left-color: var(--dm-text, #212529);\n }\n\n .domma-tooltip[data-position="right"]::before {\n left: -10px;\n top: 50%;\n transform: translateY(-50%);\n border-right-color: var(--dm-text, #212529);\n }\n ',document.head.appendChild(e)}_updateTooltipContent(){const{content:e,html:t}=this._options;if(t){const t="undefined"!=typeof DOMPurify?DOMPurify.sanitize(e):e;this._tooltip.innerHTML=t}else this._tooltip.textContent=e;this._positionTooltip()}_positionTooltip(){if(!this._tooltip||!this._wrapper)return;const{position:e,offset:t}=this._options,n=this._wrapper.getBoundingClientRect(),o=this._tooltip.getBoundingClientRect();let s,i;switch(e){case"top":default:s=n.top-o.height-t,i=n.left+(n.width-o.width)/2;break;case"bottom":s=n.bottom+t,i=n.left+(n.width-o.width)/2;break;case"left":s=n.top+(n.height-o.height)/2,i=n.left-o.width-t;break;case"right":s=n.top+(n.height-o.height)/2,i=n.right+t}const r=window.innerWidth,a=window.innerHeight;i<0&&(i=8),i+o.width>r&&(i=r-o.width-8),s<0&&(s=8),s+o.height>a&&(s=a-o.height-8),this._tooltip.style.top=s+"px",this._tooltip.style.left=i+"px"}}customElements.get("domma-tooltip")||customElements.define("domma-tooltip",v);class y extends p{static defaults={type:"spinner",size:"medium",color:"primary",overlay:!1,text:"",centered:!0,visible:!0};static sizes={small:24,medium:40,large:64};static colors={primary:"var(--dm-primary, #6495ED)",secondary:"var(--dm-secondary, #6c757d)",success:"var(--dm-success, #28a745)",danger:"var(--dm-danger, #dc3545)",warning:"var(--dm-warning, #ffc107)",info:"var(--dm-info, #17a2b8)",white:"#ffffff",dark:"var(--dm-surface-overlay, #343a40)"};static get observedAttributes(){return["type","size","color","overlay","text","centered","visible"]}constructor(){super(),this._visible=!1}_getSize(){const{size:e}=this._options;return"number"==typeof e?e:isNaN(e)?y.sizes[e]||y.sizes.medium:parseInt(e,10)}_getColor(){const{color:e}=this._options;return y.colors[e]||e}_injectStyles(){const e=document.createElement("style");e.textContent="\n \n :host {\n --dm-primary: var(--dm-primary, #6495ED);\n --dm-secondary: var(--dm-secondary, #6c757d);\n --dm-success: var(--dm-success, #28a745);\n --dm-danger: var(--dm-danger, #dc3545);\n --dm-warning: var(--dm-warning, #ffc107);\n --dm-info: var(--dm-info, #17a2b8);\n --dm-white: var(--dm-white, #ffffff);\n --dm-gray-100: var(--dm-gray-100, #f8f9fa);\n --dm-gray-200: var(--dm-gray-200, #e9ecef);\n --dm-gray-300: var(--dm-gray-300, #dee2e6);\n --dm-gray-400: var(--dm-gray-400, #ced4da);\n --dm-gray-500: var(--dm-gray-500, #adb5bd);\n --dm-gray-600: var(--dm-gray-600, #6c757d);\n --dm-gray-700: var(--dm-gray-700, #495057);\n --dm-gray-800: var(--dm-gray-800, #343a40);\n --dm-gray-900: var(--dm-gray-900, #212529);\n --dm-radius-sm: var(--dm-radius-sm, 0.25rem);\n --dm-radius-md: var(--dm-radius-md, 0.375rem);\n --dm-radius-lg: var(--dm-radius-lg, 0.5rem);\n --dm-radius-full: var(--dm-radius-full, 9999px);\n --dm-transition-fast: var(--dm-transition-fast, 150ms);\n --dm-transition-normal: var(--dm-transition-normal, 300ms);\n --dm-transition-slow: var(--dm-transition-slow, 500ms);\n --dm-shadow-sm: var(--dm-shadow-sm, 0 1px 2px 0 rgba(0, 0, 0, 0.05));\n --dm-shadow-md: var(--dm-shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1));\n --dm-shadow-lg: var(--dm-shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));\n --dm-shadow-xl: var(--dm-shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, 0.1));\n }\n \n\n :host {\n display: block;\n position: relative;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n .loader-wrapper {\n display: inline-flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 0.75rem;\n }\n\n .loader-wrapper.hidden {\n display: none !important;\n }\n\n .loader-wrapper.overlay {\n position: absolute;\n inset: 0;\n background: rgba(0, 0, 0, 0.5);\n z-index: 1000;\n }\n\n .loader-wrapper.centered {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n\n .loader-text {\n color: var(--loader-text-color, var(--dm-text, #212529));\n font-size: var(--dm-text-sm, 0.875rem);\n }\n\n .loader-wrapper.overlay .loader-text {\n color: #ffffff;\n }\n\n /* Spinner */\n .loader-spinner {\n border-radius: 50%;\n animation: spin 0.8s linear infinite;\n }\n\n @keyframes spin {\n to { transform: rotate(360deg); }\n }\n\n /* Dots */\n .loader-dots {\n display: flex;\n gap: var(--dot-gap);\n }\n\n .loader-dots span {\n border-radius: 50%;\n animation: bounce 1.4s ease-in-out infinite both;\n }\n\n .loader-dots span:nth-child(1) { animation-delay: 0s; }\n .loader-dots span:nth-child(2) { animation-delay: 0.16s; }\n .loader-dots span:nth-child(3) { animation-delay: 0.32s; }\n\n @keyframes bounce {\n 0%, 80%, 100% { transform: scale(0); }\n 40% { transform: scale(1); }\n }\n\n /* Pulse */\n .loader-pulse {\n border-radius: 50%;\n animation: pulse 1.2s ease-in-out infinite;\n }\n\n @keyframes pulse {\n 0% { transform: scale(0); opacity: 1; }\n 100% { transform: scale(1); opacity: 0; }\n }\n\n /* Bars */\n .loader-bars {\n display: flex;\n align-items: center;\n gap: var(--bar-gap);\n }\n\n .loader-bars span {\n border-radius: 2px;\n animation: bars 1s ease-in-out infinite;\n }\n\n .loader-bars span:nth-child(1) { animation-delay: 0s; }\n .loader-bars span:nth-child(2) { animation-delay: 0.1s; }\n .loader-bars span:nth-child(3) { animation-delay: 0.2s; }\n .loader-bars span:nth-child(4) { animation-delay: 0.3s; }\n\n @keyframes bars {\n 0%, 40%, 100% { transform: scaleY(0.4); }\n 20% { transform: scaleY(1); }\n }\n ",this.shadowRoot.appendChild(e)}_render(){const e=this._getSize(),t=this._getColor(),{type:n,overlay:o,text:s,centered:i,visible:r}=this._options;switch(this._wrapper=document.createElement("div"),this._wrapper.className="loader-wrapper",this._wrapper.setAttribute("part","wrapper"),this._wrapper.setAttribute("role","status"),this._wrapper.setAttribute("aria-live","polite"),o&&this._wrapper.classList.add("overlay"),i&&!o&&this._wrapper.classList.add("centered"),r||this._wrapper.classList.add("hidden"),this._loaderEl=document.createElement("div"),this._loaderEl.className=`loader-${n}`,this._loaderEl.setAttribute("part","loader"),n){case"dots":this._renderDots(e,t);break;case"pulse":this._renderPulse(e,t);break;case"bars":this._renderBars(e,t);break;default:this._renderSpinner(e,t)}this._wrapper.appendChild(this._loaderEl),s&&(this._textEl=document.createElement("span"),this._textEl.className="loader-text",this._textEl.setAttribute("part","text"),this._textEl.textContent=s,this._wrapper.appendChild(this._textEl)),this.shadowRoot.appendChild(this._wrapper),this._visible=r}_renderSpinner(e,t){const n=Math.max(2,e/10);this._loaderEl.style.cssText=`\n width: ${e}px;\n height: ${e}px;\n border: ${n}px solid ${t};\n border-top-color: transparent;\n `}_renderDots(e,t){const n=e/4,o=n/2;this._loaderEl.style.setProperty("--dot-gap",`${o}px`);for(let e=0;e<3;e++){const e=document.createElement("span");e.style.cssText=`\n width: ${n}px;\n height: ${n}px;\n background: ${t};\n `,this._loaderEl.appendChild(e)}}_renderPulse(e,t){this._loaderEl.style.cssText=`\n width: ${e}px;\n height: ${e}px;\n background: ${t};\n `}_renderBars(e,t){const n=e/6,o=e,s=n/2;this._loaderEl.style.cssText=`\n height: ${o}px;\n `,this._loaderEl.style.setProperty("--bar-gap",`${s}px`);for(let e=0;e<4;e++){const e=document.createElement("span");e.style.cssText=`\n width: ${n}px;\n height: 100%;\n background: ${t};\n `,this._loaderEl.appendChild(e)}}_onAttributeChange(e,t,n){if(this._wrapper)switch(e){case"type":case"size":case"color":this._loaderEl.remove(),this._textEl&&this._textEl.remove(),this._loaderEl=document.createElement("div"),this._loaderEl.className=`loader-${this._options.type}`,this._loaderEl.setAttribute("part","loader");const e=this._getSize(),t=this._getColor();switch(this._options.type){case"dots":this._renderDots(e,t);break;case"pulse":this._renderPulse(e,t);break;case"bars":this._renderBars(e,t);break;default:this._renderSpinner(e,t)}this._wrapper.insertBefore(this._loaderEl,this._wrapper.firstChild);break;case"text":n?(this._textEl||(this._textEl=document.createElement("span"),this._textEl.className="loader-text",this._textEl.setAttribute("part","text"),this._wrapper.appendChild(this._textEl)),this._textEl.textContent=n):this._textEl&&(this._textEl.remove(),this._textEl=null);break;case"overlay":this._wrapper.classList.toggle("overlay",""===n||"true"===n);break;case"centered":this._wrapper.classList.toggle("centered",""===n||"true"===n);break;case"visible":const o=""===n||"true"===n;this._visible=o,this._wrapper.classList.toggle("hidden",!o)}}show(){return this._visible=!0,this._wrapper.classList.remove("hidden"),this.setAttribute("visible",""),this._emit("show"),this}hide(){return this._visible=!1,this._wrapper.classList.add("hidden"),this.removeAttribute("visible"),this._emit("hide"),this}toggle(){return this._visible?this.hide():this.show()}isVisible(){return this._visible}setText(e){return this.setAttribute("text",e),this}setType(e){return this.setAttribute("type",e),this}setSize(e){return this.setAttribute("size",String(e)),this}setColor(e){return this.setAttribute("color",e),this}}customElements.get("domma-loader")||customElements.define("domma-loader",y);class b extends p{static defaults={showAfter:null,duration:300,position:"bottom-right",offset:16,target:null,zIndex:1e3,visible:!1};static get observedAttributes(){return["show-after","duration","position","offset","target","z-index","visible"]}constructor(){super(),this._isVisible=!1,this._isScrolling=!1,this._scrollContainer=null,this._scrollHandler=null}_injectStyles(){const e=document.createElement("style");e.textContent="\n \n :host {\n --dm-primary: var(--dm-primary, #6495ED);\n --dm-secondary: var(--dm-secondary, #6c757d);\n --dm-success: var(--dm-success, #28a745);\n --dm-danger: var(--dm-danger, #dc3545);\n --dm-warning: var(--dm-warning, #ffc107);\n --dm-info: var(--dm-info, #17a2b8);\n --dm-white: var(--dm-white, #ffffff);\n --dm-gray-100: var(--dm-gray-100, #f8f9fa);\n --dm-gray-200: var(--dm-gray-200, #e9ecef);\n --dm-gray-300: var(--dm-gray-300, #dee2e6);\n --dm-gray-400: var(--dm-gray-400, #ced4da);\n --dm-gray-500: var(--dm-gray-500, #adb5bd);\n --dm-gray-600: var(--dm-gray-600, #6c757d);\n --dm-gray-700: var(--dm-gray-700, #495057);\n --dm-gray-800: var(--dm-gray-800, #343a40);\n --dm-gray-900: var(--dm-gray-900, #212529);\n --dm-radius-sm: var(--dm-radius-sm, 0.25rem);\n --dm-radius-md: var(--dm-radius-md, 0.375rem);\n --dm-radius-lg: var(--dm-radius-lg, 0.5rem);\n --dm-radius-full: var(--dm-radius-full, 9999px);\n --dm-transition-fast: var(--dm-transition-fast, 150ms);\n --dm-transition-normal: var(--dm-transition-normal, 300ms);\n --dm-transition-slow: var(--dm-transition-slow, 500ms);\n --dm-shadow-sm: var(--dm-shadow-sm, 0 1px 2px 0 rgba(0, 0, 0, 0.05));\n --dm-shadow-md: var(--dm-shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1));\n --dm-shadow-lg: var(--dm-shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));\n --dm-shadow-xl: var(--dm-shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, 0.1));\n }\n \n\n :host {\n display: block;\n position: fixed;\n z-index: var(--z-index, 1000);\n }\n\n :host([hidden]) {\n display: none;\n }\n\n .back-to-top-button {\n padding: 0.5rem;\n background: var(--dm-surface, #fff);\n border: 1px solid var(--dm-border, #dee2e6);\n border-radius: 9999px;\n cursor: pointer;\n width: 40px;\n height: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 0;\n visibility: hidden;\n transform: translateY(10px);\n transition: opacity 0.2s ease, transform 0.15s ease, visibility 0.2s, background 0.2s ease, box-shadow 0.15s ease;\n }\n\n .back-to-top-button.visible {\n opacity: 1;\n visibility: visible;\n transform: translateY(0);\n }\n\n .back-to-top-button:hover {\n background: var(--dm-hover-bg, rgba(0,0,0,0.04));\n transform: translateY(0) scale(1.1);\n box-shadow: 0 2px 8px rgba(0,0,0,0.15);\n }\n\n svg {\n color: var(--dm-text, #212529);\n }\n ",this.shadowRoot.appendChild(e)}_render(){const{position:e,offset:t,zIndex:n}=this._options,o="bottom-left"===e;this.style.position="fixed",this.style.bottom=`${t}px`,this.style[o?"left":"right"]=`${t}px`,this.style.zIndex=n,this._button=document.createElement("button"),this._button.className="back-to-top-button",this._button.setAttribute("part","button"),this._button.setAttribute("title","Back to top"),this._button.setAttribute("aria-label","Scroll back to top");const s=document.createElementNS("http://www.w3.org/2000/svg","svg");s.setAttribute("width","20"),s.setAttribute("height","20"),s.setAttribute("viewBox","0 0 24 24"),s.setAttribute("fill","none"),s.setAttribute("stroke","currentColor"),s.setAttribute("stroke-width","2"),s.setAttribute("stroke-linecap","round"),s.setAttribute("stroke-linejoin","round");const i=document.createElementNS("http://www.w3.org/2000/svg","path");i.setAttribute("d","M18 15l-6-6-6 6"),s.appendChild(i),this._button.appendChild(s),this.shadowRoot.appendChild(this._button)}_bindEvents(){this._addEventListener(this._button,"click",e=>{e.preventDefault(),this.scroll()}),this._setupScrollMonitoring()}_setupScrollMonitoring(){if(this._scrollHandler){(this._scrollContainer||window).removeEventListener("scroll",this._scrollHandler)}this._options.target?this._scrollContainer="string"==typeof this._options.target?document.querySelector(this._options.target):this._options.target:this._scrollContainer=null;const e=this._scrollContainer||window;this._scrollHandler=()=>this._checkVisibility(),e.addEventListener("scroll",this._scrollHandler,{passive:!0}),this._checkVisibility()}_checkVisibility(){const e=this._options.showAfter??(this._scrollContainer?this._scrollContainer.clientHeight:window.innerHeight),t=(this._scrollContainer?this._scrollContainer.scrollTop:window.scrollY)>e;t&&!this._isVisible?this.show():!t&&this._isVisible&&this.hide()}_onAttributeChange(e,t,n){switch(e){case"position":case"offset":case"z-index":const{position:e,offset:t,zIndex:o}=this._options,s="bottom-left"===e;this.style.bottom=`${t}px`,this.style.left=s?`${t}px`:"",this.style.right=s?"":`${t}px`,this.style.zIndex=o;break;case"target":case"show-after":this._setupScrollMonitoring();break;case"visible":""===n||"true"===n?this.show():this.hide()}}_onConnect(){this._setupScrollMonitoring()}_onDisconnect(){if(this._scrollHandler){(this._scrollContainer||window).removeEventListener("scroll",this._scrollHandler)}}scroll(){if(this._isScrolling)return this;this._isScrolling=!0;const e=this._scrollContainer?this._scrollContainer.scrollTop:window.scrollY,t=performance.now(),n=this._options.duration,o=s=>{const i=s-t,r=Math.min(i/n,1),a=(l=r)*(2-l);var l;this._scrollContainer?this._scrollContainer.scrollTop=e*(1-a):window.scrollTo(0,e*(1-a)),r<1?requestAnimationFrame(o):this._isScrolling=!1};return requestAnimationFrame(o),this}show(){return this._isVisible||(this._isVisible=!0,this._button.classList.add("visible"),this._emit("show")),this}hide(){return this._isVisible?(this._isVisible=!1,this._button.classList.remove("visible"),this._emit("hide"),this):this}toggle(){return this._isVisible?this.hide():this.show()}isVisible(){return this._isVisible}getButton(){return this._button}setShowAfter(e){return this.setAttribute("show-after",String(e)),this}setPosition(e){return this.setAttribute("position",e),this}setOffset(e){return this.setAttribute("offset",String(e)),this}}customElements.get("domma-back-to-top")||customElements.define("domma-back-to-top",b);class k extends p{static defaults={message:"",title:"",type:"default",position:"top-right",duration:3e3,pauseOnHover:!0,showProgress:!0,animation:"slide",animationDuration:300,closable:!0,html:!1,icon:"",actions:[],visible:!1};static get observedAttributes(){return["message","title","type","position","duration","pause-on-hover","show-progress","animation","animation-duration","closable","html","icon","visible"]}constructor(){super(),this._progressBar=null,this._timeout=null,this._isPaused=!1,this._remainingTime=0,this._startTime=null,this._isVisible=!1}_injectStyles(){const e=document.createElement("style");e.textContent=`\n \n :host {\n --dm-primary: var(--dm-primary, #6495ED);\n --dm-secondary: var(--dm-secondary, #6c757d);\n --dm-success: var(--dm-success, #28a745);\n --dm-danger: var(--dm-danger, #dc3545);\n --dm-warning: var(--dm-warning, #ffc107);\n --dm-info: var(--dm-info, #17a2b8);\n --dm-white: var(--dm-white, #ffffff);\n --dm-gray-100: var(--dm-gray-100, #f8f9fa);\n --dm-gray-200: var(--dm-gray-200, #e9ecef);\n --dm-gray-300: var(--dm-gray-300, #dee2e6);\n --dm-gray-400: var(--dm-gray-400, #ced4da);\n --dm-gray-500: var(--dm-gray-500, #adb5bd);\n --dm-gray-600: var(--dm-gray-600, #6c757d);\n --dm-gray-700: var(--dm-gray-700, #495057);\n --dm-gray-800: var(--dm-gray-800, #343a40);\n --dm-gray-900: var(--dm-gray-900, #212529);\n --dm-radius-sm: var(--dm-radius-sm, 0.25rem);\n --dm-radius-md: var(--dm-radius-md, 0.375rem);\n --dm-radius-lg: var(--dm-radius-lg, 0.5rem);\n --dm-radius-full: var(--dm-radius-full, 9999px);\n --dm-transition-fast: var(--dm-transition-fast, 150ms);\n --dm-transition-normal: var(--dm-transition-normal, 300ms);\n --dm-transition-slow: var(--dm-transition-slow, 500ms);\n --dm-shadow-sm: var(--dm-shadow-sm, 0 1px 2px 0 rgba(0, 0, 0, 0.05));\n --dm-shadow-md: var(--dm-shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1));\n --dm-shadow-lg: var(--dm-shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));\n --dm-shadow-xl: var(--dm-shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, 0.1));\n }\n \n\n :host {\n display: block;\n min-width: 300px;\n max-width: 500px;\n margin-bottom: 12px;\n opacity: 0;\n transform: translateX(100%);\n transition: opacity ${this._options.animationDuration}ms ease,\n transform ${this._options.animationDuration}ms ease;\n }\n\n :host([hidden]) { display: none; }\n :host(.show) { opacity: 1; transform: translateX(0); }\n :host(.hiding) { opacity: 0; transform: translateX(100%); }\n\n .toast {\n position: relative;\n display: flex;\n align-items: flex-start;\n padding: 16px;\n background: var(--toast-bg);\n color: var(--toast-color);\n border-radius: 8px;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n overflow: hidden;\n }\n\n :host([type="default"]) { --toast-bg: #1f2937; --toast-color: #fff; --toast-accent: #6b7280; }\n :host([type="success"]) { --toast-bg: #065f46; --toast-color: #fff; --toast-accent: #10b981; }\n :host([type="error"]) { --toast-bg: #991b1b; --toast-color: #fff; --toast-accent: #ef4444; }\n :host([type="warning"]) { --toast-bg: #92400e; --toast-color: #fff; --toast-accent: #f59e0b; }\n :host([type="info"]) { --toast-bg: #1e40af; --toast-color: #fff; --toast-accent: #3b82f6; }\n\n .toast-icon { flex-shrink: 0; margin-right: 12px; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; }\n .toast-icon svg { width: 20px; height: 20px; }\n .toast-content { flex: 1; min-width: 0; }\n .toast-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; }\n .toast-message { font-size: 14px; line-height: 1.4; }\n .toast-actions { display: flex; gap: 8px; margin-top: 8px; }\n .toast-close { flex-shrink: 0; margin-left: 12px; padding: 0; background: none; border: none; color: currentColor; cursor: pointer; opacity: 0.7; transition: opacity 0.15s ease; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; }\n .toast-close:hover { opacity: 1; }\n .toast-progress { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: rgba(255, 255, 255, 0.2); overflow: hidden; }\n .toast-progress-bar { height: 100%; background: var(--toast-accent); transition: width linear; }\n `,this.shadowRoot.appendChild(e)}_render(){const{message:e,title:t,closable:n,icon:o,showProgress:s}=this._options,i=document.createElement("div");if(i.className="toast",i.setAttribute("part","toast"),i.setAttribute("role","alert"),o){const e=document.createElement("div");e.className="toast-icon",e.innerHTML=o,i.appendChild(e)}const r=document.createElement("div");if(r.className="toast-content",t){const e=document.createElement("div");e.className="toast-title",e.textContent=t,r.appendChild(e)}const a=document.createElement("div");if(a.className="toast-message",this._options.html?a.innerHTML=e:a.textContent=e,r.appendChild(a),this._options.actions&&this._options.actions.length&&this._renderActions(r),i.appendChild(r),n){const e=document.createElement("button");e.className="toast-close",e.innerHTML="&times;",this._addEventListener(e,"click",()=>this.close()),i.appendChild(e)}if(s&&this._options.duration>0){const e=document.createElement("div");e.className="toast-progress",this._progressBar=document.createElement("div"),this._progressBar.className="toast-progress-bar",this._progressBar.style.width="100%",e.appendChild(this._progressBar),i.appendChild(e)}this.shadowRoot.appendChild(i),this._toast=i}_renderActions(e){const t=document.createElement("div");t.className="toast-actions",this._options.actions.forEach((e,n)=>{const o=document.createElement("button");o.textContent=e.label,o.style.cssText=`padding: 6px 12px; border: none; border-radius: 4px; font-size: 12px; font-weight: 500; cursor: pointer; background: ${e.primary?"var(--toast-accent)":"rgba(255,255,255,0.2)"}; color: #fff;`,this._addEventListener(o,"click",()=>{this._emit("action",{action:e,index:n}),!1!==e.closeOnClick&&this.close()}),t.appendChild(o)}),e.appendChild(t)}_bindEvents(){this._options.pauseOnHover&&(this._addEventListener(this._toast,"mouseenter",()=>this._pause()),this._addEventListener(this._toast,"mouseleave",()=>this._resume()))}_onAttributeChange(e,t,n){if(this._toast)switch(e){case"message":case"title":case"icon":this.shadowRoot.innerHTML="",this._injectStyles(),this._render(),this._bindEvents();break;case"visible":""===n||"true"===n?this.show():this.close();break;case"duration":this._options.duration=parseInt(n,10),this._isVisible&&this._options.duration>0&&this._startTimer()}}_onConnect(){this._options.visible&&this.show()}_onDisconnect(){this._clearTimer()}show(){return this._isVisible||(this._isVisible=!0,this._remainingTime=this._options.duration,requestAnimationFrame(()=>{this.classList.add("show"),this.classList.remove("hiding")}),this._options.duration>0&&this._startTimer(),this._emit("show")),this}close(){return this._isVisible?(this._clearTimer(),this._isVisible=!1,this.classList.add("hiding"),this.classList.remove("show"),setTimeout(()=>{this._emit("close"),this.remove()},this._options.animationDuration),this):this}_startTimer(){this._clearTimer(),this._options.duration<=0||(this._startTime=Date.now(),this._timeout=setTimeout(()=>this.close(),this._remainingTime),this._progressBar&&(this._progressBar.style.transition=`width ${this._remainingTime}ms linear`,requestAnimationFrame(()=>this._progressBar.style.width="0%")))}_clearTimer(){this._timeout&&(clearTimeout(this._timeout),this._timeout=null)}_pause(){if(this._isPaused||!this._timeout)return;this._isPaused=!0,this._clearTimer();const e=Date.now()-this._startTime;if(this._remainingTime=Math.max(0,this._remainingTime-e),this._progressBar){this._progressBar.style.transition="none";const e=parseFloat(getComputedStyle(this._progressBar).width);this._progressBar.style.width=e+"px"}this._emit("pause")}_resume(){this._isPaused&&(this._isPaused=!1,this._startTimer(),this._emit("resume"))}setMessage(e){return this.setAttribute("message",e),this}setTitle(e){return this.setAttribute("title",e),this}setType(e){return this.setAttribute("type",e),this}setActions(e){this._options.actions=e;const t=this._toast.querySelector(".toast-content"),n=t.querySelector(".toast-actions");return n&&n.remove(),e&&e.length&&this._renderActions(t),this}isVisible(){return this._isVisible}}customElements.get("domma-toast")||customElements.define("domma-toast",k);class _ extends p{static defaults={backdrop:!0,backdropClose:!0,keyboard:!0,animation:"fade",animationDuration:300,closeButton:!0,size:"medium",centered:!0,scrollable:!1,title:"",content:"",footer:"",buttons:[],className:"",headerClass:"",bodyClass:"",footerClass:"",visible:!1};static get observedAttributes(){return["visible","backdrop","backdrop-close","keyboard","animation","animation-duration","close-button","size","centered","scrollable","title","content","footer","class-name"]}constructor(){super(),this._backdrop=null,this._isOpen=!1,this._keyHandler=null,this._dialog=null}_injectStyles(){const e=document.createElement("style");e.textContent='\n \n :host {\n --dm-primary: var(--dm-primary, #6495ED);\n --dm-secondary: var(--dm-secondary, #6c757d);\n --dm-success: var(--dm-success, #28a745);\n --dm-danger: var(--dm-danger, #dc3545);\n --dm-warning: var(--dm-warning, #ffc107);\n --dm-info: var(--dm-info, #17a2b8);\n --dm-white: var(--dm-white, #ffffff);\n --dm-gray-100: var(--dm-gray-100, #f8f9fa);\n --dm-gray-200: var(--dm-gray-200, #e9ecef);\n --dm-gray-300: var(--dm-gray-300, #dee2e6);\n --dm-gray-400: var(--dm-gray-400, #ced4da);\n --dm-gray-500: var(--dm-gray-500, #adb5bd);\n --dm-gray-600: var(--dm-gray-600, #6c757d);\n --dm-gray-700: var(--dm-gray-700, #495057);\n --dm-gray-800: var(--dm-gray-800, #343a40);\n --dm-gray-900: var(--dm-gray-900, #212529);\n --dm-radius-sm: var(--dm-radius-sm, 0.25rem);\n --dm-radius-md: var(--dm-radius-md, 0.375rem);\n --dm-radius-lg: var(--dm-radius-lg, 0.5rem);\n --dm-radius-full: var(--dm-radius-full, 9999px);\n --dm-transition-fast: var(--dm-transition-fast, 150ms);\n --dm-transition-normal: var(--dm-transition-normal, 300ms);\n --dm-transition-slow: var(--dm-transition-slow, 500ms);\n --dm-shadow-sm: var(--dm-shadow-sm, 0 1px 2px 0 rgba(0, 0, 0, 0.05));\n --dm-shadow-md: var(--dm-shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1));\n --dm-shadow-lg: var(--dm-shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));\n --dm-shadow-xl: var(--dm-shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, 0.1));\n }\n \n\n :host {\n display: none;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 1050;\n align-items: center;\n justify-content: center;\n }\n\n :host([visible]) {\n display: flex;\n }\n\n .modal-dialog {\n background: var(--dm-surface, #fff);\n border-radius: 8px;\n box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);\n max-width: 90%;\n max-height: 90vh;\n overflow: hidden;\n position: relative;\n opacity: 0;\n transform: scale(0.95) translateY(-10px);\n transition: opacity var(--animation-duration, 300ms) ease,\n transform var(--animation-duration, 300ms) ease;\n }\n\n :host(.show) .modal-dialog {\n opacity: 1;\n transform: scale(1) translateY(0);\n }\n\n :host([size="small"]) .modal-dialog { max-width: 400px; }\n :host([size="medium"]) .modal-dialog { max-width: 600px; }\n :host([size="large"]) .modal-dialog { max-width: 800px; }\n :host([size="xl"]) .modal-dialog { max-width: 1000px; }\n\n :host([animation="zoom"]) .modal-dialog {\n transform: scale(0.7);\n }\n\n :host([animation="zoom"].show) .modal-dialog {\n transform: scale(1);\n }\n\n :host([animation="slide"]) .modal-dialog {\n transform: translateY(-50px);\n }\n\n :host([animation="slide"].show) .modal-dialog {\n transform: translateY(0);\n }\n\n .modal-content {\n display: flex;\n flex-direction: column;\n }\n\n .modal-header {\n position: relative;\n padding: 1.5rem 1.5rem 1rem;\n border-bottom: 1px solid var(--dm-border, #e5e7eb);\n }\n\n .modal-title {\n margin: 0;\n font-size: 1.25rem;\n font-weight: 600;\n color: var(--dm-text, #212529);\n }\n\n .modal-close {\n position: absolute;\n right: 1rem;\n top: 1rem;\n background: none;\n border: none;\n font-size: 1.5rem;\n cursor: pointer;\n color: var(--dm-text-muted, #6b7280);\n line-height: 1;\n padding: 0;\n width: 2rem;\n height: 2rem;\n transition: color 0.15s ease;\n }\n\n .modal-close:hover {\n color: var(--dm-text, #212529);\n }\n\n .modal-body {\n padding: 1.5rem;\n color: var(--dm-text, #212529);\n }\n\n .modal-body-scrollable {\n max-height: 60vh;\n overflow-y: auto;\n }\n\n .modal-footer {\n display: flex;\n justify-content: flex-end;\n gap: 0.5rem;\n padding: 1rem 1.5rem;\n border-top: 1px solid var(--dm-border, #e5e7eb);\n background: var(--dm-surface-subtle, #f9fafb);\n }\n\n .modal-backdrop {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.5);\n z-index: -1;\n opacity: 0;\n transition: opacity var(--animation-duration, 300ms) ease;\n }\n\n :host(.show) .modal-backdrop {\n opacity: 1;\n }\n\n /* Button styles */\n button:not(.modal-close) {\n padding: 0.5rem 1rem;\n border: none;\n border-radius: 4px;\n font-size: 0.875rem;\n font-weight: 500;\n cursor: pointer;\n transition: background 0.15s ease;\n }\n\n .btn-primary {\n background: var(--dm-primary, #6495ED);\n color: white;\n }\n\n .btn-primary:hover {\n background: var(--dm-primary-dark, #4169E1);\n }\n\n .btn-secondary {\n background: var(--dm-secondary, #6c757d);\n color: white;\n }\n\n .btn-secondary:hover {\n background: var(--dm-secondary-dark, #5a6268);\n }\n\n .btn-success {\n background: var(--dm-success, #28a745);\n color: white;\n }\n\n .btn-success:hover {\n background: var(--dm-success-dark, #218838);\n }\n\n .btn-danger {\n background: var(--dm-danger, #dc3545);\n color: white;\n }\n\n .btn-danger:hover {\n background: var(--dm-danger-dark, #c82333);\n }\n ',this.shadowRoot.appendChild(e)}_render(){const{title:e,content:t,footer:n,closeButton:o,buttons:s,headerClass:i,bodyClass:r,footerClass:a,scrollable:l,backdrop:d}=this._options;d&&(this._backdrop=document.createElement("div"),this._backdrop.className="modal-backdrop",this.shadowRoot.appendChild(this._backdrop)),this._dialog=document.createElement("div"),this._dialog.className="modal-dialog",this._dialog.setAttribute("part","dialog"),this._dialog.setAttribute("role","dialog"),this._dialog.setAttribute("aria-modal","true");const c=document.createElement("div");if(c.className="modal-content",e||o){const t=document.createElement("div");if(t.className="modal-header"+(i?" "+i:""),t.setAttribute("part","header"),e){const n=document.createElement("h3");n.className="modal-title",n.textContent=e,t.appendChild(n)}if(o){const e=document.createElement("button");e.className="modal-close",e.setAttribute("part","close"),e.setAttribute("aria-label","Close"),e.innerHTML="&times;",this._addEventListener(e,"click",()=>this.close()),t.appendChild(e)}c.appendChild(t)}const h=document.createElement("div");h.className=`modal-body${r?" "+r:""}${l?" modal-body-scrollable":""}`,h.setAttribute("part","body");const u=document.createElement("slot");if(t?h.textContent=t:h.appendChild(u),c.appendChild(h),s&&s.length>0)this._renderFooter(c,s,a);else if(n){const e=document.createElement("div");e.className="modal-footer"+(a?" "+a:""),e.setAttribute("part","footer"),e.textContent=n,c.appendChild(e)}this._dialog.appendChild(c),this.shadowRoot.appendChild(this._dialog)}_renderFooter(e,t,n){const o=document.createElement("div");o.className="modal-footer"+(n?" "+n:""),o.setAttribute("part","footer"),t.forEach((e,t)=>{const n=document.createElement("button");n.className=`btn btn-${e.variant||"secondary"}`,n.textContent=e.text||"Button",n.setAttribute("data-button-id",e.id||`btn-${t}`),this._addEventListener(n,"click",()=>{this._emit("buttonclick",{buttonId:e.id||`btn-${t}`,button:e}),!1!==e.close&&this.close()}),o.appendChild(n)}),e.appendChild(o)}_bindEvents(){this._options.keyboard&&(this._keyHandler=e=>{"Escape"===e.key&&this._isOpen&&this.close()},document.addEventListener("keydown",this._keyHandler)),this._backdrop&&this._options.backdropClose&&this._addEventListener(this,"click",e=>{e.target===this&&this.close()})}_onAttributeChange(e,t,n){if(this._dialog)switch(e){case"visible":""===n||"true"===n?this.open():this.close();break;case"title":case"content":case"footer":case"close-button":this.shadowRoot.innerHTML="",this._injectStyles(),this._render(),this._bindEvents()}}_onConnect(){this._options.visible&&this.open()}_onDisconnect(){this._keyHandler&&document.removeEventListener("keydown",this._keyHandler)}open(){return this._isOpen||(this._isOpen=!0,this.setAttribute("visible",""),this._emit("open"),requestAnimationFrame(()=>{this.classList.add("show")}),setTimeout(()=>{this._emit("opened")},this._options.animationDuration)),this}close(){return this._isOpen?(this._emit("close"),this.classList.remove("show"),setTimeout(()=>{this._isOpen=!1,this.removeAttribute("visible"),this._emit("closed")},this._options.animationDuration),this):this}toggle(){return this._isOpen?this.close():this.open()}isOpen(){return this._isOpen}setTitle(e){return this.setAttribute("title",e),this}setContent(e){const t=this._dialog.querySelector(".modal-body");return t&&(t.textContent=e),this}setButtons(e){this._options.buttons=e;const t=this._dialog.querySelector(".modal-content"),n=t.querySelector(".modal-footer");return n&&n.remove(),e&&e.length>0&&this._renderFooter(t,e,this._options.footerClass),this}}customElements.get("domma-modal")||customElements.define("domma-modal",_);class w extends p{static defaults={hoverable:!0,shadow:"medium",rounded:!0,animation:!0,animationDuration:200,collapsible:!1,collapsed:!1,persistKey:null,collapseIcon:"chevron-down",visible:!0};static get observedAttributes(){return["hoverable","shadow","rounded","animation","animation-duration","collapsible","collapsed","persist-key","collapse-icon","visible"]}constructor(){super(),this._header=null,this._body=null,this._collapseIcon=null}_injectStyles(){const e=document.createElement("style");e.textContent='\n \n :host {\n --dm-primary: var(--dm-primary, #6495ED);\n --dm-secondary: var(--dm-secondary, #6c757d);\n --dm-success: var(--dm-success, #28a745);\n --dm-danger: var(--dm-danger, #dc3545);\n --dm-warning: var(--dm-warning, #ffc107);\n --dm-info: var(--dm-info, #17a2b8);\n --dm-white: var(--dm-white, #ffffff);\n --dm-gray-100: var(--dm-gray-100, #f8f9fa);\n --dm-gray-200: var(--dm-gray-200, #e9ecef);\n --dm-gray-300: var(--dm-gray-300, #dee2e6);\n --dm-gray-400: var(--dm-gray-400, #ced4da);\n --dm-gray-500: var(--dm-gray-500, #adb5bd);\n --dm-gray-600: var(--dm-gray-600, #6c757d);\n --dm-gray-700: var(--dm-gray-700, #495057);\n --dm-gray-800: var(--dm-gray-800, #343a40);\n --dm-gray-900: var(--dm-gray-900, #212529);\n --dm-radius-sm: var(--dm-radius-sm, 0.25rem);\n --dm-radius-md: var(--dm-radius-md, 0.375rem);\n --dm-radius-lg: var(--dm-radius-lg, 0.5rem);\n --dm-radius-full: var(--dm-radius-full, 9999px);\n --dm-transition-fast: var(--dm-transition-fast, 150ms);\n --dm-transition-normal: var(--dm-transition-normal, 300ms);\n --dm-transition-slow: var(--dm-transition-slow, 500ms);\n --dm-shadow-sm: var(--dm-shadow-sm, 0 1px 2px 0 rgba(0, 0, 0, 0.05));\n --dm-shadow-md: var(--dm-shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1));\n --dm-shadow-lg: var(--dm-shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));\n --dm-shadow-xl: var(--dm-shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, 0.1));\n }\n \n\n :host {\n display: block;\n background: var(--dm-surface, #fff);\n border: 1px solid var(--dm-border, #e5e7eb);\n border-radius: 8px;\n overflow: hidden;\n margin-bottom: 1.5rem;\n transition: transform var(--animation-duration, 200ms) ease,\n box-shadow var(--animation-duration, 200ms) ease;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n }\n\n :host([hidden]) {\n display: none;\n }\n\n :host([shadow="none"]) {\n box-shadow: none;\n }\n\n :host([shadow="small"]) {\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);\n }\n\n :host([shadow="medium"]) {\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n }\n\n :host([shadow="large"]) {\n box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);\n }\n\n :host([rounded="false"]) {\n border-radius: 0;\n }\n\n :host([hoverable]:hover) {\n transform: scale(1.02);\n box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);\n }\n\n :host([animation="false"]) {\n transition: none;\n }\n\n /* Collapsible styles */\n :host([collapsible]) ::slotted(.card-header),\n .card-header-wrapper[data-collapsible="true"] {\n cursor: pointer;\n user-select: none;\n }\n\n .card-header-wrapper {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0;\n border-bottom: 1px solid var(--dm-card-border, var(--dm-border, #e5e7eb));\n background: var(--dm-card-header-bg, var(--dm-surface-secondary, #f8fafc));\n }\n\n .card-header-content {\n flex: 1;\n background: transparent;\n }\n\n /* Strip the slotted header\'s own background/border so the wrapper provides\n a single uniform background across the full header row (text + icon).\n Without this, the text area gets double-tinted and looks darker\n than the transparent arrow area. */\n :host([collapsible]) ::slotted(.card-header) {\n background: transparent !important;\n border-bottom: none !important;\n }\n\n .card-collapse-icon {\n margin-left: 1rem;\n display: flex;\n align-items: center;\n transition: transform 200ms ease;\n color: var(--dm-text-secondary);\n background: transparent;\n padding: 1rem 1.5rem;\n }\n\n :host([collapsed]) .card-collapse-icon {\n transform: rotate(-90deg);\n }\n\n .card-body-wrapper {\n overflow: hidden;\n transition: height 200ms ease;\n }\n\n :host([collapsed]) .card-body-wrapper {\n height: 0 !important;\n }\n\n ::slotted(.card-header) {\n margin: 0;\n padding: 1rem 1.5rem;\n border-bottom: 1px solid var(--dm-card-border, var(--dm-border, #e5e7eb));\n background: var(--dm-card-header-bg, var(--dm-surface-secondary, #f8fafc));\n }\n\n ::slotted(.card-body) {\n padding: 1.5rem;\n }\n\n ::slotted(.card-footer) {\n padding: 1rem 1.5rem;\n border-top: 1px solid var(--dm-border, #e5e7eb);\n background: var(--dm-background-alt, #f8fafc);\n }\n ',this.shadowRoot.appendChild(e)}_render(){const{collapsible:e,collapsed:t}=this._options,n=document.createElement("slot");n.name="header";const o=document.createElement("slot");o.name="body";const s=document.createElement("slot");s.name="footer";const i=document.createElement("slot");if(this._bodyWrapper=document.createElement("div"),this._bodyWrapper.className="card-body-wrapper",e){this._headerWrapper=document.createElement("div"),this._headerWrapper.className="card-header-wrapper",this._headerWrapper.setAttribute("data-collapsible","true");const e=document.createElement("div");e.className="card-header-content",e.appendChild(n),this._collapseIcon=document.createElement("span"),this._collapseIcon.className="card-collapse-icon",this._collapseIcon.innerHTML=this._getCollapseIconSVG(),this._headerWrapper.appendChild(e),this._headerWrapper.appendChild(this._collapseIcon),this.shadowRoot.appendChild(this._headerWrapper)}else this.shadowRoot.appendChild(n);this._bodyWrapper.appendChild(o),this._bodyWrapper.appendChild(i),this.shadowRoot.appendChild(this._bodyWrapper),this.shadowRoot.appendChild(s)}_getCollapseIconSVG(){return'<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <polyline points="6 9 12 15 18 9"></polyline>\n </svg>'}_bindEvents(){this._options.collapsible&&this._headerWrapper&&this._addEventListener(this._headerWrapper,"click",()=>this.toggle())}_onAttributeChange(e,t,n){switch(e){case"collapsed":{const e=""===n||"true"===n;this.isCollapsed()!==e&&this._setCollapsed(e,!1);break}case"collapsible":(this._headerWrapper||this._collapseIcon)&&(this.shadowRoot.innerHTML="",this._injectStyles(),this._render(),this._bindEvents())}}_onConnect(){this._options.collapsible&&this._headerWrapper&&0===this._eventHandlers.length&&this._addEventListener(this._headerWrapper,"click",()=>this.toggle()),this._options.collapsible&&this._restoreState()}_onDisconnect(){this._options.collapsible&&this.isCollapsed()&&this._saveState()}_getStorageKey(){return this._options.persistKey||(this.id?`domma-card-${this.id}`:null)}_restoreState(){if(!this._options.collapsible)return;const e=this._getStorageKey();if(e&&"undefined"!=typeof Domma&&Domma.storage){const t=Domma.storage.get(e);if(t?.collapsed)return void this._setCollapsed(!0,!1)}this._options.collapsed&&this._setCollapsed(!0,!1)}_saveState(){const e=this._getStorageKey();e&&"undefined"!=typeof Domma&&Domma.storage&&Domma.storage.set(e,{collapsed:this.isCollapsed()})}_setCollapsed(e,t=!0){if(this._bodyWrapper){if(e){const e=this._bodyWrapper.scrollHeight;this._bodyWrapper.style.height=e+"px",this._bodyWrapper.offsetHeight,this._bodyWrapper.style.height="0px",this.setAttribute("collapsed",""),this._emit("collapse")}else{this.removeAttribute("collapsed");const e=this._bodyWrapper.scrollHeight;this._bodyWrapper.style.height=e+"px",setTimeout(()=>{this._bodyWrapper&&!this.hasAttribute("collapsed")&&(this._bodyWrapper.style.height="auto")},this._options.animationDuration),this._emit("expand")}t&&this._saveState()}}collapse(){return this._setCollapsed(!0),this}expand(){return this._setCollapsed(!1),this}toggle(){return this._setCollapsed(!this.isCollapsed()),this}isCollapsed(){return this.hasAttribute("collapsed")}setShadow(e){return this.setAttribute("shadow",e),this}setHoverable(e){return e?this.setAttribute("hoverable",""):this.removeAttribute("hoverable"),this}setContent(e){let t=this.querySelector('[slot="body"]');t||(t=document.createElement("div"),t.setAttribute("slot","body"),t.className="card-body",this.appendChild(t));const n="undefined"!=typeof Domma&&Domma.sanitize&&"function"==typeof Domma.sanitize.sanitize?Domma.sanitize.sanitize(e):e;return t.innerHTML=n,"undefined"!=typeof Domma&&Domma.icons&&"function"==typeof Domma.icons.scan&&Domma.icons.scan(t),this}getBody(){let e=this.querySelector('[slot="body"]');return e||(e=document.createElement("div"),e.setAttribute("slot","body"),e.className="card-body",this.appendChild(e)),e}updateHeight(){if(this._options.collapsible&&!this.isCollapsed()&&this._bodyWrapper){this._bodyWrapper.style.height="auto";const e=this._bodyWrapper.scrollHeight;this._bodyWrapper.style.height=e+"px"}return this}}function M(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function x(e,t,n){if(e&&t)for(const o of Array.from(e.attributes)){const s=o.name;if("class"!==s)t.hasAttribute(s)||t.setAttribute(s,o.value);else for(const o of e.classList)o!==n&&t.classList.add(o)}}function L(e,t={}){const n="string"==typeof e?document.querySelector(e):e;if(!n)return null;const o=document.createElement("domma-loader");for(const[e,n]of Object.entries(t))if("function"==typeof n){const t=e.replace(/^on/,"").toLowerCase();o.addEventListener(t,e=>{n(o)})}else"boolean"==typeof n?n&&o.setAttribute(M(e),""):null!=n&&o.setAttribute(M(e),String(n));return n.appendChild(o),o._dommaComponent=o,{element:o,options:o._options,show(){return o.show(),this},hide(){return o.hide(),this},toggle(){return o.toggle(),this},isVisible:()=>o.isVisible(),setText(e){return o.setText(e),this},setType(e){return o.setType(e),this},setSize(e){return o.setSize(e),this},setColor(e){return o.setColor(e),this},destroy(){o.destroy()}}}customElements.get("domma-card")||customElements.define("domma-card",w);class C{static defaults={position:"top-right",duration:3e3,pauseOnHover:!0,showProgress:!0,animation:"slide",animationDuration:300,closable:!0,maxToasts:5};static _containers={};static _toasts=[];static _getContainer(e){if(!C._containers[e]){const t=document.createElement("div");t.className=`domma-toast-container domma-toast-${e}`,t.style.cssText=`\n position: fixed;\n z-index: 9999;\n pointer-events: none;\n ${e.includes("top")?"top: 16px;":"bottom: 16px;"}\n ${e.includes("right")?"right: 16px;":"left: 16px;"}\n display: flex;\n flex-direction: column;\n gap: 12px;\n `,document.body.appendChild(t),C._containers[e]=t}return C._containers[e]}static show(e,t={}){const n={...C.defaults,...t},o=C._getContainer(n.position);for(;C._toasts.length>=n.maxToasts;){const e=C._toasts.shift();e&&e.close()}const s=document.createElement("domma-toast");s.style.pointerEvents="auto",s.setAttribute("message",e),n.title&&s.setAttribute("title",n.title),n.type&&s.setAttribute("type",n.type),n.position&&s.setAttribute("position",n.position),void 0!==n.duration&&s.setAttribute("duration",String(n.duration)),void 0!==n.pauseOnHover&&s.setAttribute("pause-on-hover",String(n.pauseOnHover)),void 0!==n.showProgress&&s.setAttribute("show-progress",String(n.showProgress)),n.animation&&s.setAttribute("animation",n.animation),void 0!==n.animationDuration&&s.setAttribute("animation-duration",String(n.animationDuration)),void 0!==n.closable&&s.setAttribute("closable",String(n.closable)),void 0!==n.html&&s.setAttribute("html",String(n.html)),n.icon&&s.setAttribute("icon",n.icon),n.actions&&n.actions.length>0&&(s._options=s._options||{},s._options.actions=n.actions);for(const[e,t]of Object.entries(n))if("function"==typeof t){const n=e.replace(/^on/,"").toLowerCase(),o=e=>t(e.detail||s);s.addEventListener(n,o)}o.appendChild(s),s.show();const i={element:s,close(){s.close();const e=C._toasts.indexOf(i);return e>-1&&C._toasts.splice(e,1),this},setMessage(e){return s.setMessage(e),this},setTitle(e){return s.setTitle(e),this},setType(e){return s.setType(e),this},setActions(e){return s.setActions(e),this},isVisible:()=>s.isVisible()};return C._toasts.push(i),i}static success(e,t={}){return C.show(e,{...t,type:"success",icon:'<svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"/></svg>'})}static error(e,t={}){return C.show(e,{...t,type:"error",icon:'<svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z" clip-rule="evenodd"/></svg>'})}static warning(e,t={}){return C.show(e,{...t,type:"warning",icon:'<svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z" clip-rule="evenodd"/></svg>'})}static info(e,t={}){return C.show(e,{...t,type:"info",icon:'<svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clip-rule="evenodd"/></svg>'})}static closeAll(){C._toasts.forEach(e=>e.close()),C._toasts=[]}}class E{static _container=null;static _zIndexBase=1050;static _activeModals=[];static _defaults={size:"large",title:"",content:"",buttons:[{id:"close",text:"Close",variant:"secondary"}],backdrop:!0,backdropClose:!0,keyboard:!0,animation:"fade",animationDuration:300,className:"",headerClass:"",bodyClass:"",footerClass:"",scrollable:!1,onButtonClick:null,onOpen:null,onClose:null};static _ensureContainer(){return this._container||(this._container=document.createElement("div"),this._container.className="dm-dialog-container",this._container.style.cssText="position: fixed; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; z-index: 1040;",document.body.appendChild(this._container)),this._container}static _getNextZIndex(){return this._zIndexBase+10*this._activeModals.length}static createModal(e={}){const t={...this._defaults,...e},n=this._ensureContainer(),o=document.createElement("domma-modal");o.style.zIndex=this._getNextZIndex(),o.style.pointerEvents="auto",t.size&&o.setAttribute("size",t.size),t.title&&o.setAttribute("title",t.title),t.content&&o.setAttribute("content",t.content),void 0!==t.backdrop&&o.setAttribute("backdrop",String(t.backdrop)),void 0!==t.backdropClose&&o.setAttribute("backdrop-close",String(t.backdropClose)),void 0!==t.keyboard&&o.setAttribute("keyboard",String(t.keyboard)),t.animation&&o.setAttribute("animation",t.animation),void 0!==t.animationDuration&&o.setAttribute("animation-duration",String(t.animationDuration)),void 0!==t.scrollable&&o.setAttribute("scrollable",String(t.scrollable)),t.className&&o.setAttribute("class-name",t.className),void 0!==t.closeButton&&o.setAttribute("close-button",String(t.closeButton)),t.buttons&&t.buttons.length>0&&(o._options=o._options||{},o._options.buttons=t.buttons,o._options.footerClass=t.footerClass),t.onOpen&&o.addEventListener("open",()=>t.onOpen(s)),t.onClose&&o.addEventListener("close",()=>t.onClose(s)),t.onButtonClick&&o.addEventListener("buttonclick",e=>{t.onButtonClick(e.detail.buttonId,s)}),n.appendChild(o);const s={element:o,_factoryCreated:!0,open(){return o.open(),E._activeModals.push(this),this},close(){o.close();const e=E._activeModals.indexOf(this);return e>-1&&E._activeModals.splice(e,1),this},toggle(){return o.toggle(),this},isOpen:()=>o.isOpen(),setTitle(e){return o.setTitle(e),this},setContent(e){return o.setContent(e),this},setButtons(e){return o.setButtons(e),this},remove(){return this.close(),setTimeout(()=>{o.remove();const e=E._activeModals.indexOf(this);e>-1&&E._activeModals.splice(e,1)},t.animationDuration),this},destroy(){this.remove()}};return s}static showModal(e={}){return new Promise(t=>{this.createModal({...e,onButtonClick:(n,o)=>{e.onButtonClick&&e.onButtonClick(n,o),t(n)}}).open()})}}class S extends h{static defaults={active:0,animation:"fade",animationDuration:200,tabSelector:".tab-item, [data-tab]",panelSelector:".tab-panel, [data-panel]",activeClass:"active",onChange:null};constructor(e,t={}){super(e,t),this._activeIndex=this.options.active,this._init()}_init(){if(!this.element)return;const e=this.options;this._tabs=this.element.querySelectorAll(e.tabSelector),this._panels=this.element.querySelectorAll(e.panelSelector),this._tabs.forEach((e,t)=>{this._addEventListener(e,"click",e=>{e.preventDefault(),this.activate(t)})}),this._updateState()}activate(e){if(e===this._activeIndex)return this;if(e<0||e>=this._tabs.length)return this;const t=this.options,n=this._activeIndex;return this._activeIndex=e,this._updateState(),t.onChange&&t.onChange({index:e,oldIndex:n,tab:this._tabs[e],panel:this._panels[e]}),this}_updateState(){const e=this.options;this._tabs.forEach((t,n)=>{n===this._activeIndex?t.classList.add(e.activeClass):t.classList.remove(e.activeClass)}),this._panels.forEach((t,n)=>{n===this._activeIndex?(t.style.display="block","fade"===e.animation&&(t.style.opacity="0",t.style.transition=`opacity ${e.animationDuration}ms ease`,t.offsetHeight,t.style.opacity="1")):t.style.display="none"})}getActive(){return this._activeIndex}show(e){return this.activate(e)}next(){const e=(this._activeIndex+1)%this._tabs.length;return this.activate(e)}prev(){const e=(this._activeIndex-1+this._tabs.length)%this._tabs.length;return this.activate(e)}}class A extends h{static defaults={allowMultiple:!1,multiExpand:null,activeIndex:null,animation:!0,animationDuration:300,headerSelector:".accordion-header, [data-accordion-header]",contentSelector:".accordion-body, [data-accordion-content]",activeClass:"active",onChange:null};constructor(e,t={}){super(e,t),null!==this.options.multiExpand&&(this.options.allowMultiple=this.options.multiExpand),this._init()}_init(){if(!this.element)return;const e=this.options;this._headers=this.element.querySelectorAll(e.headerSelector),this._contents=this.element.querySelectorAll(e.contentSelector),this._contents.forEach((t,n)=>{t.style.overflow="hidden",t.style.transition=e.animation?`height ${e.animationDuration}ms ease`:"none";const o=this._headers[n]?.parentElement;let s=o?.classList.contains(e.activeClass);null!==e.activeIndex&&(s=Array.isArray(e.activeIndex)?e.activeIndex.includes(n):e.activeIndex===n,s?o?.classList.add(e.activeClass):o?.classList.remove(e.activeClass)),t.style.height=s?"auto":"0"}),this._headers.forEach((e,t)=>{this._addEventListener(e,"click",()=>{this.toggle(t)})})}toggle(e){const t=this.options,n=this._headers[e],o=this._contents[e],s=n.parentElement.classList.contains(t.activeClass);return t.allowMultiple||this._headers.forEach((t,n)=>{n!==e&&this._close(n)}),s?this._close(e):this._open(e),t.onChange&&t.onChange({index:e,isOpen:!s,header:n,content:o}),this}_open(e){const t=this.options,n=this._headers[e],o=this._contents[e];n.parentElement.classList.add(t.activeClass),o.style.height=o.scrollHeight+"px",setTimeout(()=>{o.style.height="auto"},t.animationDuration)}_close(e){const t=this.options,n=this._headers[e],o=this._contents[e];n.parentElement.classList.remove(t.activeClass),o.style.height=o.scrollHeight+"px",o.offsetHeight,o.style.height="0"}open(e){return e>=0&&e<this._headers.length&&this._open(e),this}close(e){return e>=0&&e<this._headers.length&&this._close(e),this}openAll(){return this._headers.forEach((e,t)=>this._open(t)),this}closeAll(){return this._headers.forEach((e,t)=>this._close(t)),this}}class $ extends h{static defaults={selectable:!1,multiSelect:!1,activeClass:"active",disabledClass:"disabled",itemSelector:".list-group-item",keyboard:!0,loop:!0,focusOnInit:!1,onChange:null,onSelect:null,onDeselect:null};constructor(e,t={}){super(e,t),this._items=[],this._focusedIndex=-1,this._init()}_init(){if(this.element&&(this.refresh(),this.options.selectable&&(this.element.setAttribute("role","listbox"),this.options.multiSelect&&this.element.setAttribute("aria-multiselectable","true")),this._addEventListener(this.element,"click",e=>{if(!this.options.selectable)return;const t=e.target.closest(this.options.itemSelector);if(!t||!this.element.contains(t))return;if(t.classList.contains(this.options.disabledClass))return;const n=this._items.indexOf(t);-1!==n&&this._handleItemClick(n,e)}),this._addEventListener(this.element,"focusin",e=>{const t=e.target.closest(this.options.itemSelector);if(!t||!this.element.contains(t))return;const n=this._items.indexOf(t);-1!==n&&(this._focusedIndex=n)}),this._items.forEach(e=>{e.classList.contains(this.options.disabledClass)&&e.setAttribute("aria-disabled","true")}),this.options.keyboard&&this._setupKeyboard(),this._initTabindex(),this.options.focusOnInit&&this._items.length>0)){const e=this._items.findIndex(e=>!e.classList.contains(this.options.disabledClass));-1!==e&&this._moveFocus(e)}}_initTabindex(){const e=this._items.findIndex(e=>!e.classList.contains(this.options.disabledClass));this._items.forEach((t,n)=>{t.setAttribute("tabindex",n===e?"0":"-1")}),-1!==e&&(this._focusedIndex=e)}_setupKeyboard(){this._addEventListener(this.element,"keydown",e=>{switch(e.key){case"ArrowDown":case"ArrowRight":e.preventDefault(),this._moveFocus(this._nextEnabledIndex(this._focusedIndex,1));break;case"ArrowUp":case"ArrowLeft":e.preventDefault(),this._moveFocus(this._nextEnabledIndex(this._focusedIndex,-1));break;case"Home":e.preventDefault(),this._moveFocus(this._firstEnabledIndex());break;case"End":e.preventDefault(),this._moveFocus(this._lastEnabledIndex());break;case"Enter":case" ":if(e.preventDefault(),this.options.selectable&&-1!==this._focusedIndex){const t=this._items[this._focusedIndex];t&&!t.classList.contains(this.options.disabledClass)&&this._handleItemClick(this._focusedIndex,e)}}})}_nextEnabledIndex(e,t){const n=this._items.length;if(0===n)return-1;let o=e,s=0;do{if(o+=t,this.options.loop)o=(o%n+n)%n;else{if(o<0)return this._firstEnabledIndex();if(o>=n)return this._lastEnabledIndex()}if(s++,s>n)return-1}while(this._items[o].classList.contains(this.options.disabledClass));return o}_firstEnabledIndex(){return this._items.findIndex(e=>!e.classList.contains(this.options.disabledClass))}_lastEnabledIndex(){for(let e=this._items.length-1;e>=0;e--)if(!this._items[e].classList.contains(this.options.disabledClass))return e;return-1}_moveFocus(e){-1===e||e>=this._items.length||(-1!==this._focusedIndex&&this._items[this._focusedIndex]&&this._items[this._focusedIndex].setAttribute("tabindex","-1"),this._items[e].setAttribute("tabindex","0"),this._items[e].focus({preventScroll:!0}),this._focusedIndex=e)}_handleItemClick(e,t){const n=this._items[e],o=n.classList.contains(this.options.activeClass);if(this.options.multiSelect)o?(n.classList.remove(this.options.activeClass),this.options.selectable&&n.setAttribute("aria-selected","false"),this.options.onDeselect&&this.options.onDeselect(n,e,t)):(n.classList.add(this.options.activeClass),this.options.selectable&&n.setAttribute("aria-selected","true"),this.options.onSelect&&this.options.onSelect(n,e,t));else{if(this._items.filter((t,n)=>n!==e&&t.classList.contains(this.options.activeClass)).forEach(e=>{e.classList.remove(this.options.activeClass),this.options.selectable&&e.setAttribute("aria-selected","false");const n=this._items.indexOf(e);this.options.onDeselect&&this.options.onDeselect(e,n,t)}),o)return n.classList.remove(this.options.activeClass),this.options.selectable&&n.setAttribute("aria-selected","false"),this.options.onDeselect&&this.options.onDeselect(n,e,t),void(this.options.onChange&&this.options.onChange(this.getSelected(),t));n.classList.add(this.options.activeClass),this.options.selectable&&n.setAttribute("aria-selected","true"),this.options.onSelect&&this.options.onSelect(n,e,t)}this.options.onChange&&this.options.onChange(this.getSelected(),t)}_updateAriaSelected(){this.options.selectable&&this._items.forEach(e=>{e.setAttribute("aria-selected",String(e.classList.contains(this.options.activeClass)))})}select(e){if(e<0||e>=this._items.length)return this;const t=this._items[e];return t.classList.contains(this.options.disabledClass)||(this.options.multiSelect||this._items.forEach((e,t)=>{e.classList.contains(this.options.activeClass)&&(e.classList.remove(this.options.activeClass),this.options.selectable&&e.setAttribute("aria-selected","false"),this.options.onDeselect&&this.options.onDeselect(e,t,null))}),t.classList.add(this.options.activeClass),this.options.selectable&&t.setAttribute("aria-selected","true"),this.options.onSelect&&this.options.onSelect(t,e,null),this.options.onChange&&this.options.onChange(this.getSelected(),null)),this}deselect(e){if(e<0||e>=this._items.length)return this;const t=this._items[e];return t.classList.remove(this.options.activeClass),this.options.selectable&&t.setAttribute("aria-selected","false"),this.options.onDeselect&&this.options.onDeselect(t,e,null),this.options.onChange&&this.options.onChange(this.getSelected(),null),this}toggle(e){if(e<0||e>=this._items.length)return this;return this._items[e].classList.contains(this.options.activeClass)?this.deselect(e):this.select(e)}selectAll(){return this.options.multiSelect?(this._items.forEach((e,t)=>{e.classList.contains(this.options.disabledClass)||(e.classList.add(this.options.activeClass),this.options.selectable&&e.setAttribute("aria-selected","true"),this.options.onSelect&&this.options.onSelect(e,t,null))}),this.options.onChange&&this.options.onChange(this.getSelected(),null),this):this}deselectAll(){return this._items.forEach((e,t)=>{e.classList.contains(this.options.activeClass)&&(e.classList.remove(this.options.activeClass),this.options.selectable&&e.setAttribute("aria-selected","false"),this.options.onDeselect&&this.options.onDeselect(e,t,null))}),this.options.onChange&&this.options.onChange(this.getSelected(),null),this}getSelected(){return this._items.filter(e=>e.classList.contains(this.options.activeClass))}isSelected(e){return!(e<0||e>=this._items.length)&&this._items[e].classList.contains(this.options.activeClass)}enable(e){if(e<0||e>=this._items.length)return this;const t=this._items[e];return t.classList.remove(this.options.disabledClass),t.removeAttribute("aria-disabled"),this}disable(e){if(e<0||e>=this._items.length)return this;const t=this._items[e];return t.classList.add(this.options.disabledClass),t.setAttribute("aria-disabled","true"),this}getItems(){return[...this._items]}getItem(e){return this._items[e]||null}refresh(){return this.element?(this._items=Array.from(this.element.querySelectorAll(this.options.itemSelector)),this.options.selectable&&this._items.forEach(e=>{e.setAttribute("aria-selected",e.classList.contains(this.options.activeClass)?"true":"false")}),this._items.forEach(e=>{e.classList.contains(this.options.disabledClass)?e.setAttribute("aria-disabled","true"):e.removeAttribute("aria-disabled")}),this._initTabindex(),this):this}destroy(){this._items.forEach(e=>{e.removeAttribute("tabindex"),e.removeAttribute("aria-disabled")}),this.options.selectable&&(this.element.removeAttribute("role"),this.element.removeAttribute("aria-multiselectable"),this._items.forEach(e=>{e.removeAttribute("aria-selected")})),super.destroy()}}class z extends h{static defaults={trigger:"click",position:"bottom-start",offset:[0,4],animation:!0,animationDuration:150,hoverCloseDelay:180,closeOnSelect:!0,closeOnClickOutside:!0,items:[],model:null,modelKey:null,itemTemplate:null,onOpen:null,onClose:null,onSelect:null};constructor(e,t={}){super(e,t),this._menu=null,this._isOpen=!1,this._items=[...this.options.items],this._selectedValue=null,this._modelUnsubscribe=null,this._hoverCloseTimer=null,this._init()}_init(){if(!this.element)return;const e=this.options;"click"===e.trigger?this._addEventListener(this.element,"click",e=>{e.stopPropagation(),this.toggle()}):"hover"===e.trigger&&(this._addEventListener(this.element,"mouseenter",()=>{clearTimeout(this._hoverCloseTimer),this.open()}),this._addEventListener(this.element,"mouseleave",()=>this._scheduleHoverClose())),e.closeOnClickOutside&&(this._outsideClickHandler=e=>{!this._isOpen||this.element.contains(e.target)||this._menu&&this._menu.contains(e.target)||this.close()},document.addEventListener("click",this._outsideClickHandler)),e.model&&e.modelKey&&this._bindToModel(e.model,e.modelKey)}_bindToModel(e,t){if(e&&"function"==typeof e.get){const n=e.get(t);Array.isArray(n)&&(this._items=[...n]);const o=e=>{Array.isArray(e)&&(this._items=[...e],this._isOpen&&this._renderMenu())};"function"==typeof e.onFieldChange?this._modelUnsubscribe=e.onFieldChange(t,o):"function"==typeof e.onChange&&(this._modelUnsubscribe=e.onChange(({field:e,newValue:n})=>{e===t&&o(n)}))}}open(){if(this._isOpen)return this;const e=this.options;return e.onOpen&&e.onOpen(this),this._createMenu(),this._positionMenu(),this._isOpen=!0,this}close(){if(!this._isOpen)return this;const e=this.options;this._isOpen=!1;const t=this._menu;return this._menu=null,t&&(t.classList.remove("show"),setTimeout(()=>t.remove(),e.animationDuration)),e.onClose&&e.onClose(this),this}toggle(){return this._isOpen?this.close():this.open()}_createMenu(){const e=this.options;this._menu=document.createElement("div"),this._menu.className="domma-dropdown-menu","hover"===this.options.trigger&&this._menu.classList.add("domma-dropdown-menu-hover"),this._renderMenu(),document.body.appendChild(this._menu),"hover"===e.trigger&&(this._addEventListener(this._menu,"mouseenter",()=>clearTimeout(this._hoverCloseTimer)),this._addEventListener(this._menu,"mouseleave",()=>this._scheduleHoverClose())),this._menu.offsetHeight,this._menu.classList.add("show")}_scheduleHoverClose(){clearTimeout(this._hoverCloseTimer),this._hoverCloseTimer=setTimeout(()=>this.close(),this.options.hoverCloseDelay)}_renderMenu(){if(!this._menu)return;const e=this.options;this._menu.innerHTML="",this._items.forEach((t,n)=>{const o=document.createElement("div");if(o.className="domma-dropdown-item","string"==typeof t)o.textContent=t,o.dataset.value=t;else{if(t.divider)return o.className="domma-dropdown-divider",void this._menu.appendChild(o);if(t.header)return o.className="domma-dropdown-header",o.textContent=t.header,void this._menu.appendChild(o);if(e.itemTemplate?o.innerHTML=e.itemTemplate(t,n):o.textContent=t.label||t.text||t.name||"",o.dataset.value=void 0!==t.value?t.value:n,t.disabled&&o.classList.add("disabled"),t.icon){const e=document.createElement("span");e.className="domma-dropdown-icon",e.innerHTML=t.icon,o.insertBefore(e,o.firstChild)}}this._addEventListener(o,"click",e=>{e.stopPropagation(),this._selectItem(t,n,o.dataset.value)}),this._menu.appendChild(o)})}_selectItem(e,t,n){const o=this.options;if(this._selectedValue=n,o.onSelect&&o.onSelect({item:e,index:t,value:n},this),o.model&&o.modelKey&&"function"==typeof o.model.set){const e=o.selectedKey||o.modelKey+"_selected";o.model.set(e,n)}o.closeOnSelect&&this.close()}_positionMenu(){if(!this._menu||!this.element)return;const e=this.options,t=this.element.getBoundingClientRect(),[n,o]=e.offset;let s,i;switch(e.position){case"bottom-start":default:s=t.bottom+o,i=t.left+n;break;case"bottom-end":s=t.bottom+o,i=t.right-this._menu.offsetWidth+n;break;case"top-start":s=t.top-this._menu.offsetHeight-o,i=t.left+n;break;case"top-end":s=t.top-this._menu.offsetHeight-o,i=t.right-this._menu.offsetWidth+n}s+=window.scrollY,i+=window.scrollX,this._menu.style.top=s+"px",this._menu.style.left=i+"px"}setItems(e){return this._items=[...e],this._isOpen&&this._renderMenu(),this}addItem(e){return this._items.push(e),this._isOpen&&this._renderMenu(),this}removeItem(e){return this._items.splice(e,1),this._isOpen&&this._renderMenu(),this}getSelected(){return this._selectedValue}isOpen(){return this._isOpen}destroy(){super.destroy(),clearTimeout(this._hoverCloseTimer),this._outsideClickHandler&&document.removeEventListener("click",this._outsideClickHandler),this._modelUnsubscribe&&"function"==typeof this._modelUnsubscribe&&this._modelUnsubscribe(),this._menu&&this._menu.remove()}}class j{static permission="undefined"!=typeof Notification?Notification.permission:"denied";static isSupported="undefined"!=typeof Notification;static _instances=[];static defaults={title:"Notification",body:"",icon:null,badge:null,tag:null,requireInteraction:!1,silent:!1,data:null,onClick:null,onClose:null,onError:null,onShow:null};static async requestPermission(){if(!j.isSupported)return console.warn("Notifications are not supported in this browser"),"denied";try{const e=await Notification.requestPermission();return j.permission=e,e}catch(e){return console.error("Error requesting notification permission:",e),"denied"}}static notify(e,t={}){const n=new j({title:e,...t});return n.show(),n}static closeAll(){j._instances.forEach(e=>{e.isShown()&&e.close()}),j._instances=[]}constructor(e={}){this.options={...j.defaults,...e},this.notification=null,this._shown=!1}async show(){if(!j.isSupported)return console.warn("Notifications are not supported in this browser"),this.options.onError&&this.options.onError(new Error("Notifications not supported")),this;if("granted"!==j.permission){if("default"!==j.permission)return console.warn("Notification permission denied"),this.options.onError&&this.options.onError(new Error("Permission denied")),this;if("granted"!==await j.requestPermission())return console.warn("Notification permission denied"),this.options.onError&&this.options.onError(new Error("Permission denied")),this}try{const e={};this.options.body&&(e.body=this.options.body),this.options.icon&&(e.icon=this.options.icon),this.options.badge&&(e.badge=this.options.badge),this.options.tag&&(e.tag=this.options.tag),void 0!==this.options.requireInteraction&&(e.requireInteraction=this.options.requireInteraction),void 0!==this.options.silent&&(e.silent=this.options.silent),this.options.data&&(e.data=this.options.data),this.notification=new Notification(this.options.title,e),this._shown=!0,j._instances.push(this),this.options.onClick&&(this.notification.onclick=e=>{this.options.onClick(e,this)}),this.options.onClose?this.notification.onclose=e=>{this._shown=!1;const t=j._instances.indexOf(this);t>-1&&j._instances.splice(t,1),this.options.onClose(e,this)}:this.notification.onclose=()=>{this._shown=!1;const e=j._instances.indexOf(this);e>-1&&j._instances.splice(e,1)},this.options.onError&&(this.notification.onerror=e=>{this._shown=!1,this.options.onError(e,this)}),this.options.onShow&&(this.notification.onshow=e=>{this.options.onShow(e,this)})}catch(e){console.error("Error showing notification:",e),this.options.onError&&this.options.onError(e)}return this}close(){return this.notification&&this._shown&&(this.notification.close(),this._shown=!1),this}isShown(){return this._shown}}class B extends h{static defaults={duration:6e4,autoStart:!1,format:"mm:ss",showControls:!1,updateInterval:100,notification:!1,notificationOptions:{},sound:!1,soundUrl:null,onTick:null,onComplete:null,onStart:null,onPause:null,onReset:null};constructor(e,t={}){super(e,t),e||(this.element=null,this.options={...B.defaults,...t}),this._running=!1,this._remaining=this.options.duration,this._intervalId=null,this._startTime=null,this._pausedTime=null,this._display=null,this._controls=null,this._audio=null,this._init()}_init(){this.element&&(this._createDisplay(),this.options.showControls&&this._createControls()),this.options.sound&&this.options.soundUrl&&(this._audio=new Audio(this.options.soundUrl)),this.options.autoStart&&this.start()}_createDisplay(){if(!this.element)return;const e=document.createElement("div");e.className="dm-timer",this._display=document.createElement("div"),this._display.className="dm-timer-display";const t=document.createElement("span");t.className="dm-timer-time",t.textContent=this._formatTime(this._remaining),this._display.appendChild(t),e.appendChild(this._display),this.element.innerHTML="",this.element.appendChild(e),this._container=e}_createControls(){if(!this.element||!this._container)return;const e=document.createElement("div");e.className="dm-timer-controls",this._startBtn=document.createElement("button"),this._startBtn.className="dm-timer-button dm-timer-start",this._startBtn.textContent="Start",this._startBtn.addEventListener("click",()=>this.start()),this._pauseBtn=document.createElement("button"),this._pauseBtn.className="dm-timer-button dm-timer-pause",this._pauseBtn.textContent="Pause",this._pauseBtn.style.display="none",this._pauseBtn.addEventListener("click",()=>this.pause()),this._resetBtn=document.createElement("button"),this._resetBtn.className="dm-timer-button dm-timer-reset",this._resetBtn.textContent="Reset",this._resetBtn.addEventListener("click",()=>this.reset()),e.appendChild(this._startBtn),e.appendChild(this._pauseBtn),e.appendChild(this._resetBtn),this._container.appendChild(e),this._controls=e}_updateDisplay(){if(!this._display)return;const e=this._display.querySelector(".dm-timer-time");e&&(e.textContent=this._formatTime(this._remaining))}_formatTime(e){const t=Math.max(0,Math.floor(e/1e3)),n=Math.floor(t/3600),o=Math.floor(t%3600/60),s=t%60,i=this.options.format.toLowerCase();if("hh:mm:ss"===i)return`${String(n).padStart(2,"0")}:${String(o).padStart(2,"0")}:${String(s).padStart(2,"0")}`;if("mm:ss"===i){const e=Math.floor(t/60);return`${String(e).padStart(2,"0")}:${String(s).padStart(2,"0")}`}return"ss"===i?String(t).padStart(2,"0"):`${String(o).padStart(2,"0")}:${String(s).padStart(2,"0")}`}_tick(){if(!this._running)return;const e=Date.now()-this._startTime;this._remaining=Math.max(0,this.options.duration-e),this._updateDisplay(),this.options.onTick&&this.options.onTick(this._remaining),0===this._remaining&&this._complete()}_complete(){if(this.stop(),this.options.sound&&this._audio&&this._audio.play().catch(e=>{console.warn("Failed to play timer sound:",e)}),this.options.notification&&j.isSupported){const e={title:"Timer Complete",body:"Your countdown has finished",...this.options.notificationOptions};j.notify(e.title,e)}this.options.onComplete&&this.options.onComplete()}start(){return this._running||(this._running=!0,this._startTime=Date.now()-(this.options.duration-this._remaining),this._intervalId=setInterval(()=>this._tick(),this.options.updateInterval),this._startBtn&&(this._startBtn.style.display="none"),this._pauseBtn&&(this._pauseBtn.style.display="inline-block"),this.options.onStart&&this.options.onStart()),this}pause(){return this._running?(this._running=!1,this._pausedTime=Date.now(),this._intervalId&&(clearInterval(this._intervalId),this._intervalId=null),this._startBtn&&(this._startBtn.style.display="inline-block"),this._pauseBtn&&(this._pauseBtn.style.display="none"),this.options.onPause&&this.options.onPause(),this):this}reset(){return this.stop(),this._remaining=this.options.duration,this._updateDisplay(),this._startBtn&&(this._startBtn.style.display="inline-block"),this._pauseBtn&&(this._pauseBtn.style.display="none"),this.options.onReset&&this.options.onReset(),this}stop(){return this._running=!1,this._intervalId&&(clearInterval(this._intervalId),this._intervalId=null),this}add(e){return this._remaining=Math.min(this._remaining+e,864e5),this._updateDisplay(),this}subtract(e){return this._remaining=Math.max(0,this._remaining-e),this._updateDisplay(),0===this._remaining&&this._running&&this._complete(),this}setDuration(e){return this.options.duration=e,this._running||(this._remaining=e,this._updateDisplay()),this}isRunning(){return this._running}getRemaining(){return this._remaining}getElapsed(){return this.options.duration-this._remaining}destroy(){this.stop(),this._startBtn&&this._startBtn.removeEventListener("click",this.start),this._pauseBtn&&this._pauseBtn.removeEventListener("click",this.pause),this._resetBtn&&this._resetBtn.removeEventListener("click",this.reset),this.element&&this._container&&this.element.removeChild(this._container),this._display=null,this._controls=null,this._audio=null,this._container=null,super.destroy&&super.destroy()}}class T{static defaults={alarms:[],timezone:"local",checkInterval:3e4,storageKey:"domma-alarms",onTrigger:null,onSnooze:null,onDismiss:null,onAlarmAdd:null,onAlarmRemove:null};static _instance=null;static _checkInterval=null;static _nextAlarmId=1;constructor(e={}){if(T._instance)return T._instance;this.options={...T.defaults,...e},this._alarms=[],this._init(),T._instance=this}_init(){this._loadAlarms(),this._startChecking()}_loadAlarms(){try{const e=localStorage.getItem(this.options.storageKey);if(e){const t=JSON.parse(e);if(this._alarms=Array.isArray(t)?t:[],this._alarms.length>0){const e=Math.max(...this._alarms.map(e=>{const t=String(e.id).match(/\d+$/);return t?parseInt(t[0]):0}));T._nextAlarmId=e+1}}else this.options.alarms&&this.options.alarms.length>0&&(this._alarms=this.options.alarms.map(e=>({id:"alarm-"+T._nextAlarmId++,enabled:!0,notification:!0,notificationOptions:{},sound:!1,soundUrl:null,repeat:null,lastTriggered:null,snoozedUntil:null,...e})),this._saveAlarms())}catch(e){console.error("Failed to load alarms from localStorage:",e),this._alarms=[]}}_saveAlarms(){try{localStorage.setItem(this.options.storageKey,JSON.stringify(this._alarms))}catch(e){console.error("Failed to save alarms to localStorage:",e)}}_startChecking(){T._checkInterval||(T._checkInterval=setInterval(()=>{this._checkAlarms()},this.options.checkInterval),this._checkAlarms())}_stopChecking(){T._checkInterval&&(clearInterval(T._checkInterval),T._checkInterval=null)}_checkAlarms(){const e=new Date;this._alarms.forEach(t=>{t.enabled&&(t.snoozedUntil&&e<new Date(t.snoozedUntil)||(t.snoozedUntil&&e>=new Date(t.snoozedUntil)&&(t.snoozedUntil=null,this._saveAlarms()),this._shouldTrigger(t,e)&&this._triggerAlarm(t)))})}_shouldTrigger(e,t){const{hours:n,minutes:o}=this._parseTime(e.time),s=t.getHours(),i=t.getMinutes();if(s!==n||i!==o)return!1;if(e.lastTriggered){if(t-new Date(e.lastTriggered)<5e4)return!1}return!!this._matchesRepeatPattern(e,t)}_parseTime(e){const[t,n]=e.split(":").map(e=>parseInt(e,10));return{hours:t,minutes:n}}_matchesRepeatPattern(e,t){if(!e.repeat)return!0;const n=t.getDay();if("daily"===e.repeat)return!0;if("weekdays"===e.repeat)return n>=1&&n<=5;if("weekends"===e.repeat)return 0===n||6===n;if(Array.isArray(e.repeat)){const t=["sun","mon","tue","wed","thu","fri","sat"][n];return e.repeat.includes(t)}return!1}_triggerAlarm(e){if(e.lastTriggered=Date.now(),this._saveAlarms(),e.sound&&e.soundUrl){new Audio(e.soundUrl).play().catch(e=>{console.warn("Failed to play alarm sound:",e)})}if(e.notification&&j.isSupported){const t={title:"Alarm",body:e.label||`Alarm at ${e.time}`,requireInteraction:!0,...e.notificationOptions};j.notify(t.title,t)}this.options.onTrigger&&this.options.onTrigger(e),e.repeat||(e.enabled=!1,this._saveAlarms())}add(e){const t={id:"alarm-"+T._nextAlarmId++,enabled:!0,notification:!0,notificationOptions:{},sound:!1,soundUrl:null,repeat:null,lastTriggered:null,snoozedUntil:null,...e};return this._alarms.push(t),this._saveAlarms(),this.options.onAlarmAdd&&this.options.onAlarmAdd(t),t}remove(e){const t=this._alarms.findIndex(t=>t.id===e);if(-1===t)return!1;const n=this._alarms.splice(t,1)[0];return this._saveAlarms(),this.options.onAlarmRemove&&this.options.onAlarmRemove(n),!0}update(e,t){const n=this._alarms.find(t=>t.id===e);return n?(Object.assign(n,t),this._saveAlarms(),n):null}enable(e){return null!==this.update(e,{enabled:!0})}disable(e){return null!==this.update(e,{enabled:!1})}toggle(e){const t=this._alarms.find(t=>t.id===e);return t?(t.enabled=!t.enabled,this._saveAlarms(),t.enabled):null}snooze(e,t=3e5){const n=this._alarms.find(t=>t.id===e);return!!n&&(n.snoozedUntil=Date.now()+t,this._saveAlarms(),this.options.onSnooze&&this.options.onSnooze(n,t),!0)}getAlarms(){return[...this._alarms]}getAlarm(e){return this._alarms.find(t=>t.id===e)||null}getNextAlarm(){const e=new Date;let t=null,n=null;return this._alarms.forEach(o=>{if(!o.enabled)return;const s=this._getNextOccurrence(o,e);s&&(!n||s<n)&&(n=s,t={...o,nextTrigger:s})}),t}_getNextOccurrence(e,t){const{hours:n,minutes:o}=this._parseTime(e.time),s=new Date(t),i=new Date(s);i.setHours(n,o,0,0),i<=s&&i.setDate(i.getDate()+1);for(let t=0;t<7;t++){if(this._matchesRepeatPattern(e,i))return i;i.setDate(i.getDate()+1)}return null}clearAll(){return this._alarms=[],this._saveAlarms(),this}destroy(){this._stopChecking(),this._alarms=[],T._instance=null}}class W extends h{static defaults={autoplay:!1,interval:5e3,pauseOnHover:!0,loop:!0,animation:"slide",animationDuration:500,animationEasing:"ease",showArrows:!0,showIndicators:!0,slideSelector:".carousel-slide, [data-slide]",activeClass:"active",onChange:null};constructor(e,t={}){super(e,t),this._currentIndex=0,this._autoplayTimer=null,this._isAnimating=!1,this._init()}_init(){if(!this.element)return;const e=this.options;if(this._slides=this.element.querySelectorAll(e.slideSelector),this._track=this.element.querySelector(".carousel-track"),0===this._slides.length)return;this.element.style.position="relative",this.element.style.overflow="hidden";const t="fade"===e.animation||"crossfade"===e.animation;this._slides.forEach((n,o)=>{t?(n.style.position=0===o?"relative":"absolute",n.style.top="0",n.style.left="0",n.style.width="100%",n.style.opacity=0===o?"1":"0",n.style.zIndex=0===o?"1":"0",n.style.transition=`opacity ${e.animationDuration}ms ${e.animationEasing}`):(n.style.position="relative",n.style.width="100%",n.style.flexShrink="0")}),"slide"===e.animation&&this._track&&(this._track.style.display="flex",this._track.style.transition=`transform ${e.animationDuration}ms ${e.animationEasing}`),e.showArrows&&this._createArrows(),e.showIndicators&&this._createIndicators(),e.autoplay&&(this._startAutoplay(),e.pauseOnHover&&(this._addEventListener(this.element,"mouseenter",()=>this._stopAutoplay()),this._addEventListener(this.element,"mouseleave",()=>this._startAutoplay()))),this._addEventListener(this.element,"keydown",e=>{"ArrowLeft"===e.key&&this.prev(),"ArrowRight"===e.key&&this.next()}),this.element.tabIndex=0,this._updateState()}_createArrows(){const e=document.createElement("button");e.className="carousel-arrow carousel-prev",e.innerHTML='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M15 18l-6-6 6-6"/></svg>',e.style.cssText="\n position: absolute;\n top: 50%;\n left: 1rem;\n transform: translateY(-50%);\n z-index: 10;\n background: rgba(255,255,255,0.9);\n border: none;\n border-radius: 50%;\n width: 40px;\n height: 40px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.2s ease;\n box-shadow: 0 2px 8px rgba(0,0,0,0.15);\n ",this._addEventListener(e,"click",()=>this.prev()),this._addEventListener(e,"mouseenter",()=>e.style.background="#fff"),this._addEventListener(e,"mouseleave",()=>e.style.background="rgba(255,255,255,0.9)");const t=document.createElement("button");t.className="carousel-arrow carousel-next",t.innerHTML='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M9 18l6-6-6-6"/></svg>',t.style.cssText=e.style.cssText.replace("left: 1rem","right: 1rem"),this._addEventListener(t,"click",()=>this.next()),this._addEventListener(t,"mouseenter",()=>t.style.background="#fff"),this._addEventListener(t,"mouseleave",()=>t.style.background="rgba(255,255,255,0.9)"),this.element.appendChild(e),this.element.appendChild(t),this._prevBtn=e,this._nextBtn=t}_createIndicators(){const e=document.createElement("div");e.className="carousel-indicators",e.style.cssText="\n position: absolute;\n bottom: 1rem;\n left: 50%;\n transform: translateX(-50%);\n display: flex;\n gap: 0.5rem;\n z-index: 10;\n ",this._slides.forEach((t,n)=>{const o=document.createElement("button");o.className="carousel-indicator",o.style.cssText="\n width: 10px;\n height: 10px;\n border-radius: 50%;\n border: none;\n background: rgba(255,255,255,0.5);\n cursor: pointer;\n padding: 0;\n transition: all 0.2s ease;\n ",this._addEventListener(o,"click",()=>this.goTo(n)),e.appendChild(o)}),this.element.appendChild(e),this._indicators=e}_updateState(e=null){const t=this.options;if("fade"===t.animation?this._slides.forEach((e,t)=>{const n=t===this._currentIndex;e.style.position=n?"relative":"absolute",e.style.opacity=n?"1":"0",e.style.zIndex=n?"1":"0"}):"crossfade"===t.animation?null===e||e===this._currentIndex?this._slides.forEach((e,t)=>{const n=t===this._currentIndex;e.style.position=n?"relative":"absolute",e.style.opacity=n?"1":"0",e.style.zIndex=n?"1":"0"}):this._applyCrossfade(e,this._currentIndex):this._track&&(this._track.style.transform=`translateX(-${100*this._currentIndex}%)`),this._indicators){this._indicators.querySelectorAll(".carousel-indicator").forEach((e,t)=>{e.style.background=t===this._currentIndex?"rgba(255,255,255,1)":"rgba(255,255,255,0.5)",e.style.transform=t===this._currentIndex?"scale(1.2)":"scale(1)"})}!t.loop&&this._prevBtn&&this._nextBtn&&(this._prevBtn.style.opacity=0===this._currentIndex?"0.3":"1",this._prevBtn.style.pointerEvents=0===this._currentIndex?"none":"auto",this._nextBtn.style.opacity=this._currentIndex===this._slides.length-1?"0.3":"1",this._nextBtn.style.pointerEvents=this._currentIndex===this._slides.length-1?"none":"auto")}_applyCrossfade(e,t){const n=this._slides[e],o=this._slides[t];o.style.position="absolute",o.style.opacity="0",o.style.zIndex="2",n.style.position="relative",n.style.opacity="1",n.style.zIndex="1",this._slides.forEach((n,o)=>{o!==e&&o!==t&&(n.style.position="absolute",n.style.opacity="0",n.style.zIndex="0")}),o.offsetWidth,requestAnimationFrame(()=>{o.style.opacity="1",n.style.opacity="0"}),this._crossfadeSwapTimer&&clearTimeout(this._crossfadeSwapTimer),this._crossfadeSwapTimer=setTimeout(()=>{o.style.position="relative",o.style.zIndex="1",n.style.position="absolute",n.style.zIndex="0",this._crossfadeSwapTimer=null},this.options.animationDuration)}_startAutoplay(){this._autoplayTimer||(this._autoplayTimer=setInterval(()=>{this.next()},this.options.interval))}_stopAutoplay(){this._autoplayTimer&&(clearInterval(this._autoplayTimer),this._autoplayTimer=null)}goTo(e){if(this._isAnimating)return this;const t=this.options,n=this._currentIndex,o=this._slides.length-1;if(t.loop)e<0&&(e=o),e>o&&(e=0);else if(e<0||e>o)return this;return e===this._currentIndex||(this._isAnimating=!0,this._currentIndex=e,this._updateState(n),setTimeout(()=>{this._isAnimating=!1},t.animationDuration),t.onChange&&t.onChange({index:e,oldIndex:n,slide:this._slides[e]})),this}next(){return this.goTo(this._currentIndex+1)}prev(){return this.goTo(this._currentIndex-1)}play(){return this._startAutoplay(),this}pause(){return this._stopAutoplay(),this}getIndex(){return this._currentIndex}getSlide(e=this._currentIndex){return this._slides[e]}destroy(){super.destroy(),this._stopAutoplay(),this._crossfadeSwapTimer&&(clearTimeout(this._crossfadeSwapTimer),this._crossfadeSwapTimer=null)}}class H extends h{static defaults={message:'We use cookies to enhance your browsing experience, serve personalized content, and analyze our traffic. By clicking "Accept All", you consent to our use of cookies.',acceptAllText:"Accept All",rejectAllText:"Reject All",customizeText:"Customize",savePreferencesText:"Save Preferences",privacyPolicyText:"Privacy Policy",privacyPolicyUrl:"/privacy-policy",cookiePolicyText:"Cookie Policy",cookiePolicyUrl:null,categories:{necessary:{label:"Necessary Cookies",description:"These cookies are essential for the website to function properly.",required:!0},functional:{label:"Functional Cookies",description:"These cookies enable personalized features and functionality.",required:!1},analytics:{label:"Analytics Cookies",description:"These cookies help us understand how visitors interact with our website.",required:!1},marketing:{label:"Marketing Cookies",description:"These cookies are used to deliver relevant ads and marketing campaigns.",required:!1}},position:"bottom",theme:"light",layout:"bar",animation:!0,backdrop:!1,autoShow:!0,hideAfterAction:!0,reopenSelector:"[data-cookie-consent-open]",storageKey:"domma-cookie-consent",storageDuration:365,defaultState:"undecided",requireExplicitConsent:!0,consentVersion:"1.0",onVersionMismatch:null,onAccept:null,onReject:null,onCustomize:null,onChange:null,onShow:null,onHide:null};constructor(e={}){super(null,e),this._state=null,this._preferences={},this._customizeModal=null,this._isVisible=!1,this._init()}_init(){this._loadPreferences(),this._createUI(),this._setupEventHandlers(),this.options.autoShow&&!this._hasConsented()&&this.show(),this._setupReopenTriggers()}_loadPreferences(){const e=Domma.storage.get(this.options.storageKey);if(e&&e.timestamp){if((Date.now()-e.timestamp)/864e5<=this.options.storageDuration)return e.version&&e.version!==this.options.consentVersion?(this._state="undecided",this._preferences={},Object.keys(this.options.categories).forEach(e=>{const t=this.options.categories[e];this._preferences[e]=t.required||!this.options.requireExplicitConsent}),void(this.options.onVersionMismatch&&this.options.onVersionMismatch(e.version,this.options.consentVersion))):(this._state=e.state,void(this._preferences=e.preferences||{}))}this._state=this.options.defaultState,this._preferences={},Object.keys(this.options.categories).forEach(e=>{const t=this.options.categories[e];this._preferences[e]=t.required||!this.options.requireExplicitConsent})}_savePreferences(){Domma.storage.set(this.options.storageKey,{state:this._state,preferences:this._preferences,timestamp:Date.now(),version:this.options.consentVersion})}_hasConsented(){return"accepted"===this._state||"rejected"===this._state||"customized"===this._state}_createUI(){this.element=document.createElement("div"),this.element.className=`dm-cookie-consent dm-cookie-consent-${this.options.position} dm-cookie-consent-${this.options.layout} dm-cookie-consent-${this.options.theme}`,this.element.setAttribute("role","dialog"),this.element.setAttribute("aria-label","Cookie consent"),this.element.style.display="none",this.options.animation&&this.element.classList.add("dm-cookie-consent-animated");let e='<div class="dm-cookie-consent-content">';e+=`<div class="dm-cookie-consent-message">${this.options.message}`;const t=[];this.options.privacyPolicyUrl&&t.push(`<a href="${this.options.privacyPolicyUrl}" target="_blank" rel="noopener">${this.options.privacyPolicyText}</a>`),this.options.cookiePolicyUrl&&t.push(`<a href="${this.options.cookiePolicyUrl}" target="_blank" rel="noopener">${this.options.cookiePolicyText}</a>`),t.length>0&&(e+=` ${t.join(" | ")}`),e+="</div>",e+='<div class="dm-cookie-consent-buttons">',Object.keys(this.options.categories).length>1&&(e+=`<button type="button" class="btn btn-outline dm-cookie-consent-customize">${this.options.customizeText}</button>`),e+=`<button type="button" class="btn btn-outline dm-cookie-consent-reject">${this.options.rejectAllText}</button>`,e+=`<button type="button" class="btn btn-primary dm-cookie-consent-accept">${this.options.acceptAllText}</button>`,e+="</div></div>",this.options.backdrop&&"modal"===this.options.layout&&(e=`<div class="dm-cookie-consent-backdrop"></div>${e}`),this.element.innerHTML=e,document.body.appendChild(this.element)}_createCustomizeModal(){if(this._customizeModal)return;this._customizeModal=document.createElement("div"),this._customizeModal.className="dm-cookie-consent-modal",this._customizeModal.setAttribute("role","dialog"),this._customizeModal.setAttribute("aria-label","Customize cookie preferences");let e='<div class="dm-cookie-consent-modal-content">';e+='<div class="dm-cookie-consent-modal-header">',e+="<h3>Cookie Preferences</h3>",e+='<button type="button" class="dm-cookie-consent-modal-close" aria-label="Close">&times;</button>',e+="</div>",e+='<div class="dm-cookie-consent-modal-body">',Object.entries(this.options.categories).forEach(([t,n])=>{const o=this._preferences[t]?"checked":"",s=n.required?"disabled":"";e+='<div class="dm-cookie-consent-category">',e+='<label class="dm-cookie-consent-category-label">',e+=`<input type="checkbox" class="dm-cookie-consent-category-toggle" data-category="${t}" ${o} ${s}>`,e+='<div class="dm-cookie-consent-category-info">',e+=`<div class="dm-cookie-consent-category-name">${n.label}`,n.required&&(e+=' <span class="dm-cookie-consent-required">(Required)</span>'),e+="</div>",e+=`<div class="dm-cookie-consent-category-description">${n.description}</div>`,e+="</div></label></div>"}),e+="</div>",e+='<div class="dm-cookie-consent-modal-footer">',e+='<button type="button" class="btn btn-outline dm-cookie-consent-modal-cancel">Cancel</button>',e+=`<button type="button" class="btn btn-primary dm-cookie-consent-modal-save">${this.options.savePreferencesText}</button>`,e+="</div></div>",e=`<div class="dm-cookie-consent-modal-backdrop"></div>${e}`,this._customizeModal.innerHTML=e,document.body.appendChild(this._customizeModal),this._setupModalHandlers()}_setupEventHandlers(){const e=this.element.querySelector(".dm-cookie-consent-accept");e&&e.addEventListener("click",()=>this.accept());const t=this.element.querySelector(".dm-cookie-consent-reject");t&&t.addEventListener("click",()=>this.reject());const n=this.element.querySelector(".dm-cookie-consent-customize");if(n&&n.addEventListener("click",()=>this.showCustomize()),this.options.backdrop&&"modal"===this.options.layout){const e=this.element.querySelector(".dm-cookie-consent-backdrop");e&&e.addEventListener("click",()=>{this.options.requireExplicitConsent||this.hide()})}}_setupModalHandlers(){if(!this._customizeModal)return;const e=this._customizeModal.querySelector(".dm-cookie-consent-modal-close");e&&e.addEventListener("click",()=>this.hideCustomize());const t=this._customizeModal.querySelector(".dm-cookie-consent-modal-cancel");t&&t.addEventListener("click",()=>this.hideCustomize());const n=this._customizeModal.querySelector(".dm-cookie-consent-modal-save");n&&n.addEventListener("click",()=>this.saveCustomPreferences());const o=this._customizeModal.querySelector(".dm-cookie-consent-modal-backdrop");o&&o.addEventListener("click",()=>this.hideCustomize())}_setupReopenTriggers(){this.options.reopenSelector&&document.addEventListener("click",e=>{e.target.closest(this.options.reopenSelector)&&(e.preventDefault(),this.show())})}show(){this._isVisible||(this.element.style.display="",this.options.animation?requestAnimationFrame(()=>{this.element.classList.add("dm-cookie-consent-visible")}):this.element.classList.add("dm-cookie-consent-visible"),this._isVisible=!0,this.options.onShow&&this.options.onShow.call(this))}hide(){if(!this._isVisible)return;const e=()=>{this.element.style.display="none",this._isVisible=!1,this.options.onHide&&this.options.onHide.call(this)};this.options.animation?(this.element.classList.remove("dm-cookie-consent-visible"),setTimeout(e,300)):(this.element.classList.remove("dm-cookie-consent-visible"),e())}accept(){Object.keys(this.options.categories).forEach(e=>{this._preferences[e]=!0}),this._state="accepted",this._savePreferences(),this.options.onAccept&&this.options.onAccept.call(this,this._preferences),this.options.onChange&&this.options.onChange.call(this,this._state,this._preferences),this.options.hideAfterAction&&this.hide()}reject(){Object.entries(this.options.categories).forEach(([e,t])=>{this._preferences[e]=t.required}),this._state="rejected",this._savePreferences(),this.options.onReject&&this.options.onReject.call(this),this.options.onChange&&this.options.onChange.call(this,this._state,this._preferences),this.options.hideAfterAction&&this.hide()}showCustomize(){this._createCustomizeModal(),this._customizeModal.querySelectorAll(".dm-cookie-consent-category-toggle").forEach(e=>{const t=e.dataset.category;e.checked=this._preferences[t]||!1}),this._customizeModal.style.display="flex",this.options.animation?requestAnimationFrame(()=>{this._customizeModal.classList.add("dm-cookie-consent-modal-visible")}):this._customizeModal.classList.add("dm-cookie-consent-modal-visible"),this.options.onCustomize&&this.options.onCustomize.call(this,this._preferences)}hideCustomize(){if(!this._customizeModal)return;const e=()=>{this._customizeModal.style.display="none"};this.options.animation?(this._customizeModal.classList.remove("dm-cookie-consent-modal-visible"),setTimeout(e,300)):(this._customizeModal.classList.remove("dm-cookie-consent-modal-visible"),e())}saveCustomPreferences(){this._customizeModal.querySelectorAll(".dm-cookie-consent-category-toggle").forEach(e=>{const t=e.dataset.category;this._preferences[t]=e.checked}),this._state="customized",this._savePreferences(),this.hideCustomize(),this.options.onAccept&&this.options.onAccept.call(this,this._preferences),this.options.onChange&&this.options.onChange.call(this,this._state,this._preferences),this.options.hideAfterAction&&this.hide()}getState(){return this._state}getPreferences(){return{...this._preferences}}isAccepted(e=null){return e?!0===this._preferences[e]:"accepted"===this._state||"customized"===this._state}reset(){this._state=this.options.defaultState,this._preferences={},Object.keys(this.options.categories).forEach(e=>{const t=this.options.categories[e];this._preferences[e]=t.required||!this.options.requireExplicitConsent}),Domma.storage.remove(this.options.storageKey),this.options.onChange&&this.options.onChange.call(this,this._state,this._preferences)}destroy(){this.hide(),this.hideCustomize(),this.element&&(this.element.remove(),this.element=null),this._customizeModal&&(this._customizeModal.remove(),this._customizeModal=null)}}const I={_container:null,_defaults:{title:"",message:"",confirmText:"OK",cancelText:"Cancel",inputPlaceholder:"",inputValue:"",inputType:"text",animation:!0,backdrop:!0,backdropClose:!1,keyboard:!0,className:""},_ensureContainer(){return this._container||(this._container=document.createElement("div"),this._container.className="dm-dialog-container",document.body.appendChild(this._container)),this._container},_createDialog(e,t){const n={...this._defaults,...t},o=this._ensureContainer();return new Promise(t=>{const s=document.createElement("div");s.className="dm-dialog-overlay"+(n.animation?" dm-dialog-animate":"");const i=document.createElement("div");i.className=`dm-dialog dm-dialog-${e}${n.className?" "+n.className:""}`,i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true");let a='<div class="dm-dialog-content">';if(n.title){a+=`<div class="dm-dialog-header"><h3 class="dm-dialog-title">${r.sanitise(String(n.title),{preset:"basic"})}</h3></div>`}if(a+='<div class="dm-dialog-body">',n.message){a+=`<p class="dm-dialog-message">${r.sanitise(String(n.message),{preset:"basic"})}</p>`}if("prompt"===e){const e=r.sanitise(String(n.inputPlaceholder||""),{preset:"basic"}),t=r.sanitise(String(n.inputValue||""),{preset:"basic"});a+=`<input type="${n.inputType}" class="dm-dialog-input form-input" placeholder="${e}" value="${t}">`}a+="</div>",a+='<div class="dm-dialog-footer">',"confirm"!==e&&"prompt"!==e||(a+=`<button type="button" class="btn btn-outline dm-dialog-cancel">${n.cancelText}</button>`),a+=`<button type="button" class="btn btn-primary dm-dialog-confirm">${n.confirmText}</button>`,a+="</div></div>",i.innerHTML=a,s.appendChild(i),o.appendChild(s);const l=i.querySelector(".dm-dialog-confirm"),d=i.querySelector(".dm-dialog-cancel"),c=i.querySelector(".dm-dialog-input"),h=c||l;setTimeout(()=>h?.focus(),50),c&&c.select();const u=e=>{n.animation?(s.classList.add("dm-dialog-closing"),setTimeout(()=>{s.remove(),t(e)},200)):(s.remove(),t(e))},p=()=>{u("prompt"===e?c.value:"confirm"===e||void 0)},m=()=>{u("prompt"===e&&null)};if(l.addEventListener("click",p),d?.addEventListener("click",m),n.backdropClose&&s.addEventListener("click",e=>{e.target===s&&m()}),n.keyboard){const t=n=>{"Escape"===n.key?(m(),document.removeEventListener("keydown",t)):("Enter"===n.key&&"prompt"!==e||"Enter"===n.key&&"prompt"===e&&n.target===c)&&(p(),document.removeEventListener("keydown",t))};document.addEventListener("keydown",t)}})},alert(e,t={}){return"object"==typeof e&&(e=(t=e).message||""),this._createDialog("alert",{...t,message:e})},confirm(e,t={}){return"object"==typeof e&&(e=(t=e).message||""),this._createDialog("confirm",{...t,message:e})},prompt(e,t={}){return"object"==typeof e&&(e=(t=e).message||""),this._createDialog("prompt",{...t,message:e})}};class D extends h{static defaults={mode:"single",activeClass:"active",allowEmpty:!1,onChange:null};constructor(e,t={}){super(e,t),this._init()}_init(){this.element&&(this.buttons=Array.from(this.element.querySelectorAll(".btn")),this.buttons.forEach((e,t)=>{e.dataset.index=t,this._addEventListener(e,"click",n=>{n.preventDefault(),this._handleClick(e,t)})}))}_handleClick(e,t){const n=e.classList.contains(this.options.activeClass);"single"===this.options.mode?n&&this.options.allowEmpty?this.options.allowEmpty&&e.classList.remove(this.options.activeClass):(this.buttons.forEach(e=>e.classList.remove(this.options.activeClass)),e.classList.add(this.options.activeClass)):e.classList.toggle(this.options.activeClass),this.options.onChange&&this.options.onChange(this.getValue(),t,e)}getValue(){const e=this.buttons.map((e,t)=>e.classList.contains(this.options.activeClass)?t:-1).filter(e=>-1!==e);return"single"===this.options.mode?e.length>0?e[0]:null:e}getActive(){const e=this.buttons.filter(e=>e.classList.contains(this.options.activeClass));return"single"===this.options.mode?e.length>0?e[0]:null:e}setValue(e){const t=Array.isArray(e)?e:[e];return this.buttons.forEach((e,n)=>{t.includes(n)?e.classList.add(this.options.activeClass):e.classList.remove(this.options.activeClass)}),this}toggle(e){return e>=0&&e<this.buttons.length&&this._handleClick(this.buttons[e],e),this}selectAll(){return"multiple"===this.options.mode&&(this.buttons.forEach(e=>e.classList.add(this.options.activeClass)),this.options.onChange&&this.options.onChange(this.getValue(),-1,null)),this}deselectAll(){return this.buttons.forEach(e=>e.classList.remove(this.options.activeClass)),this.options.onChange&&this.options.onChange(this.getValue(),-1,null),this}}class O extends h{static defaults={items:[],separator:"/",homeIcon:!1,responsive:!0,onChange:null};static separators={"/":"/",">":"›","→":"→",chevron:'<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M9 18l6-6-6-6"/></svg>'};constructor(e,t={}){super(e,t),this._init()}_init(){this.element&&(this._render(),this._bindEvents())}_getSeparatorHTML(){const{separator:e}=this.options;return O.separators[e]||e}_render(){const{items:e,homeIcon:t,responsive:n}=this.options,o=this._getSeparatorHTML();this.element.className="dm-breadcrumbs",n&&this.element.classList.add("dm-breadcrumbs-responsive"),this.element.setAttribute("aria-label","Breadcrumb");let s="";e.forEach((n,i)=>{const r=i===e.length-1,a=0===i;i>0&&(s+=`<span class="dm-breadcrumbs-separator" aria-hidden="true">${o}</span>`);let l=n.text||n;a&&t&&(l=`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="vertical-align: middle; margin-right: 4px;"><path d="M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>${l}`),r||n.active?s+=`<span class="dm-breadcrumbs-item active" aria-current="page">${l}</span>`:s+=`<a href="${n.url||"#"}" class="dm-breadcrumbs-item dm-breadcrumbs-link" data-index="${i}">${l}</a>`}),this.element.innerHTML=s,this._injectStyles()}_injectStyles(){}_bindEvents(){this._addEventListener(this.element,"click",e=>{const t=e.target.closest(".dm-breadcrumbs-link");if(t){const n=parseInt(t.dataset.index,10);this.options.onChange&&(e.preventDefault(),this.options.onChange(this.options.items[n],n,e))}})}setItems(e){return this.options.items=e,this._render(),this}addItem(e){if(this.options.items.length>0){const e=this.options.items[this.options.items.length-1];"object"==typeof e&&(e.active=!1)}return this.options.items.push(e),this._render(),this}removeItem(e){return e>=0&&e<this.options.items.length&&(this.options.items.splice(e,1),this._render()),this}getItems(){return[...this.options.items]}}class N extends h{static defaults={brand:null,items:[],position:"static",variant:"light",collapsible:!0,collapseAt:768,appearOnHover:!1,actions:[],onItemClick:null};constructor(e,t={}){super(e,t),this._isCollapsed=!0,this._init()}_init(){this.element&&(this._render(),this._bindEvents())}_render(){const{brand:e,items:t,position:n,variant:o,collapsible:s,actions:i}=this.options;this.element.className="navbar",this.element.classList.add(`navbar-${o}`),"static"!==n&&this.element.classList.add(`navbar-${n}`),this.element.setAttribute("role","navigation");let r='<div class="navbar-container">';e&&(r+='<div class="navbar-brand">',e.url&&(r+=`<a href="${e.url}" class="navbar-brand-link">`),e.html?r+=e.html:(e.logo&&(r+=`<img src="${e.logo}" alt="${e.text||""}" class="navbar-logo">`),e.text&&(r+=`<span class="navbar-brand-text">${e.text}</span>`)),e.url&&(r+="</a>"),r+="</div>"),s&&(r+='\n <button class="navbar-toggle" aria-label="Toggle navigation" aria-expanded="false">\n <span class="navbar-toggle-icon"></span>\n </button>\n '),r+='<div class="navbar-collapse">',r+='<ul class="navbar-nav">',r+=this._renderItems(t,0,""),r+="</ul>",i&&i.length>0&&(r+='<div class="navbar-actions">',i.forEach((e,t)=>{const n=e.variant||"primary",o=e.icon?`<span data-icon="${e.icon}" data-size="16" style="margin-right: 6px; vertical-align: middle;"></span>`:"";r+=`<a href="${e.url||"#"}" class="navbar-action dm-btn dm-btn-${n}" data-action="${t}">${o}${e.text}</a>`}),r+="</div>"),r+="</div>",r+="</div>",this.element.innerHTML=r,this._toggle=this.element.querySelector(".navbar-toggle"),this._collapse=this.element.querySelector(".navbar-collapse"),this._scanIcons()}_renderItems(e,t,n){let o="";return(e||[]).forEach((e,s)=>{const i=""===n?`${s}`:`${n}.${s}`;if(e.divider)return void(o+='<li class="navbar-dropdown-divider"></li>');const r=e.items&&e.items.length>0,a=0===t?18:16,l=e.icon?`<span data-icon="${e.icon}" data-size="${a}" style="margin-right: 6px; vertical-align: middle;"></span>`:"",d='<svg class="navbar-caret" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M6 9l6 6 6-6"/></svg>';if(r)0===t?(o+='<li class="navbar-item navbar-dropdown">',o+=`<button class="navbar-link navbar-dropdown-toggle" data-index="${s}" data-path="${i}">${l}${e.text}${d}</button>`,o+='<ul class="navbar-dropdown-menu">'):(o+='<li class="navbar-item navbar-dropdown navbar-dropdown-sub">',o+=`<button class="navbar-dropdown-toggle navbar-submenu-toggle" data-path="${i}">${l}${e.text}${d}</button>`,o+='<ul class="navbar-dropdown-menu navbar-dropdown-submenu">'),o+=this._renderItems(e.items,t+1,i),o+="</ul></li>";else{const r=e.url||"#",a=e.external||r.startsWith("http://")||r.startsWith("https://")?' target="_blank" rel="noopener noreferrer"':"";if(0===t)o+=`<li class="navbar-item"><a href="${r}" class="navbar-link${e.active?" active":""}" data-index="${s}" data-path="${i}"${a}>${l}${e.text}</a></li>`;else{o+=`<li><a href="${r}" class="navbar-dropdown-item" data-path="${i}"${1===t?` data-index="${n}" data-subindex="${s}"`:""}${a}>${l}${e.text}</a></li>`}}}),o}_scanIcons(){void 0!==window.Domma&&window.Domma.icons&&window.Domma.icons.scan&&window.Domma.icons.scan(this.element)}_bindEvents(){if(this._toggle&&this._addEventListener(this._toggle,"click",()=>{this.toggle()}),this._addEventListener(this.element,"click",e=>{const t=e.target.closest(".navbar-link:not(.navbar-dropdown-toggle)");if(t){const n=parseInt(t.dataset.index,10);this.options.onItemClick&&(e.preventDefault(),this.options.onItemClick(this.options.items[n],n,e)),window.innerWidth<this.options.collapseAt&&this.collapse()}const n=e.target.closest(".navbar-dropdown-item");if(n&&this.options.onItemClick){e.preventDefault();const t=n.dataset.path,o=t?t.split(".").map(e=>parseInt(e,10)):[parseInt(n.dataset.index,10),parseInt(n.dataset.subindex,10)];let s={items:this.options.items};for(let e=0;e<o.length-1;e++)s=s.items[o[e]];const i=o[o.length-1],r=s.items[i],a=s.items===this.options.items?null:s;this.options.onItemClick(r,i,e,a)}}),this._addEventListener(this.element,"click",e=>{const t=e.target.closest(".navbar-dropdown-toggle");if(t){const e=t.closest(".navbar-dropdown");e.classList.toggle("open"),e.classList.contains("open")&&this._positionMenu(e)}}),this._addEventListener(document,"click",e=>{e.target.closest(".navbar-dropdown")||this.element.querySelectorAll(".navbar-dropdown.open").forEach(e=>{e.classList.remove("open")})}),this._addEventListener(window,"resize",()=>{window.innerWidth>=this.options.collapseAt&&(this._collapse?.classList.remove("show"),this._isCollapsed=!0,this._toggle&&this._toggle.setAttribute("aria-expanded","false"))}),this.options.appearOnHover){const e=150;let t=null;const n=e=>{const t=new Set;for(let n=e;n&&n!==this.element;n=n.parentElement)n.classList&&n.classList.contains("navbar-dropdown")&&t.add(n);this.element.querySelectorAll(".navbar-dropdown").forEach(e=>{t.has(e)?e.classList.contains("open")||(e.classList.add("open"),this._positionMenu(e)):e.classList.remove("open")})};this._addEventListener(this.element,"mouseover",e=>{window.innerWidth<this.options.collapseAt||e.target.closest(".navbar-dropdown")&&(clearTimeout(t),n(e.target))}),this._addEventListener(this.element,"mouseout",n=>{window.innerWidth<this.options.collapseAt||n.relatedTarget&&this.element.contains(n.relatedTarget)||(clearTimeout(t),t=setTimeout(()=>{this.element.querySelectorAll(".navbar-dropdown.open").forEach(e=>e.classList.remove("open"))},e))})}}_positionMenu(e){if(window.innerWidth<this.options.collapseAt)return;const t=e.querySelector(":scope > .navbar-dropdown-menu");if(!t)return;const n=t.classList.contains("navbar-dropdown-submenu");t.classList.remove("navbar-dropdown-flip-x","navbar-dropdown-flip-end"),t.style.top="",t.style.maxHeight="",t.style.overflowY="",requestAnimationFrame(()=>{let e=t.getBoundingClientRect();if(!e.width&&!e.height)return;e.right>window.innerWidth-8&&(t.classList.add(n?"navbar-dropdown-flip-x":"navbar-dropdown-flip-end"),e=t.getBoundingClientRect());const o=e.bottom-(window.innerHeight-8);o>0&&(n?t.style.top=-Math.min(Math.ceil(o),Math.floor(e.top-8))+"px":t.querySelector(".navbar-dropdown-sub")||(t.style.maxHeight=Math.max(120,Math.floor(window.innerHeight-e.top-8))+"px",t.style.overflowY="auto"))})}setActive(e){return this.options.items.forEach((t,n)=>{t.active=n===e}),this._render(),this}setItems(e){return this.options.items=e,this._render(),this}expand(){return this._collapse&&(this._collapse.classList.add("show"),this._isCollapsed=!1,this._toggle&&this._toggle.setAttribute("aria-expanded","true")),this}collapse(){return this._collapse&&(this._collapse.classList.remove("show"),this._isCollapsed=!0,this._toggle&&this._toggle.setAttribute("aria-expanded","false")),this}toggle(){return this._isCollapsed?this.expand():this.collapse()}isCollapsed(){return this._isCollapsed}}class V extends h{static defaults={position:"left",fixed:!0,width:"250px",top:"0",header:null,items:[],footer:null,variant:"dark",collapsible:!0,collapseAt:768,activeSection:null,expandedSections:[],persistExpanded:!1,persistKey:null,animationDuration:200,push:!0,contentSelector:".main-content",scrollSpy:!1,scrollSpyOffset:"-100px 0px -50% 0px",scrollSpyThreshold:.5,floating:!1,customContent:null,collapsibleDesktop:!1,collapsedWidth:"60px",persistCollapsed:!1,persistCollapseKey:null,onItemClick:null,onToggle:null,onExpand:null,onCollapse:null};constructor(e,t={}){super(e,t),this._isOpen=!1,this._isCollapsed=!1,this._expandedItems=new Set(this.options.expandedSections||[]),this._init()}_init(){this.element&&(this._loadExpandedState(),this._loadCollapsedState(),this._findContentElement(),this._render(),this._bindEvents(),this._scanIcons(),this._handleInitialPushState(),this.options.scrollSpy&&this._initScrollSpy(),this._isCollapsed&&this.options.collapsibleDesktop&&setTimeout(()=>{this._createFloatingToggle()},0))}_findContentElement(){this.options.push&&this.options.contentSelector&&(this._contentElement=document.querySelector(this.options.contentSelector),this._contentElement||console.warn(`[Sidebar] Push mode enabled but content element "${this.options.contentSelector}" not found`))}_handleInitialPushState(){if(this.options.push&&this._contentElement){const e=window.innerWidth>=this.options.collapseAt;(!this.options.collapsible||e)&&this._applyPush()}}_render(){const{position:e,fixed:t,width:n,top:o,header:s,items:i,footer:r,variant:a,collapsible:l,collapsibleDesktop:d,collapsedWidth:c}=this.options;this.element.className="sidebar",this.element.classList.add(`sidebar-${a}`),this.element.classList.add(`sidebar-${e}`),t&&this.element.classList.add("sidebar-fixed"),d&&this.element.classList.add("sidebar-desktop-collapsible"),this._isCollapsed&&d&&this.element.classList.add("sidebar-collapsed"),n&&(this.element.style.setProperty("--sidebar-width",n),this.element.style.width=n),c&&this.element.style.setProperty("--sidebar-collapsed-width",c),o&&t&&(this.element.style.top=o,this.element.style.height=`calc(100vh - ${o})`),this.element.setAttribute("role","navigation"),this.element.setAttribute("aria-label","Sidebar navigation");let h="";if(s){if(h+='<div class="sidebar-header">',s.icon&&(h+=`<span class="sidebar-header-icon" data-icon="${s.icon}" data-size="24"></span>`),s.title&&(h+=`<h3 class="sidebar-header-title">${s.title}</h3>`),l&&!1!==s.toggle){const e="right"===this.options.position?"chevron-right":"chevron-left",t=this._isCollapsed&&d?"chevron-right":e;h+=`\n <button class="sidebar-toggle-btn" aria-label="Toggle sidebar" aria-expanded="${this._isOpen}">\n <span class="sidebar-toggle-icon" data-icon="${t}" data-size="20"></span>\n </button>\n `}h+="</div>"}h+='<nav class="sidebar-nav">',h+=this._renderItems(i),h+="</nav>",r&&(h+='<div class="sidebar-footer">',r.html?h+=r.html:r.text&&(h+=`<p class="sidebar-footer-text">${r.text}</p>`),h+="</div>"),this.element.innerHTML=h,this._toggle=this.element.querySelector(".sidebar-toggle-btn"),this._nav=this.element.querySelector(".sidebar-nav"),this._overlay=null,this._floatingToggle=null}_renderItems(e,t=0,n=""){if(!e||0===e.length)return"";let o=`<ul class="sidebar-menu" data-depth="${t}">`;return e.forEach((e,s)=>{const i=n?`${n}.${s}`:`${s}`;if(e.divider)return void(o+='<li class="sidebar-divider"></li>');if(e.heading)return void(o+=`<li class="sidebar-heading">${e.heading}</li>`);const r=e.items&&e.items.length>0,a=this._expandedItems.has(i),l=e.section===this.options.activeSection;o+=`<li class="sidebar-item ${r?"has-children":""} ${a?"open":""}" data-path="${i}" data-depth="${t}">`,o+=r?`\n <button class="sidebar-link sidebar-link-toggle ${l?"active":""}" data-path="${i}">\n ${e.icon?`<span class="sidebar-icon" data-icon="${e.icon}" data-size="18"></span>`:""}\n <span class="sidebar-text">${e.text}</span>\n ${e.badge?`<span class="sidebar-badge">${e.badge}</span>`:""}\n <svg class="sidebar-chevron" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">\n <path d="M9 18l6-6-6-6"/>\n </svg>\n </button>\n `:`\n <a href="${e.url||"#"}" class="sidebar-link ${l?"active":""}" data-path="${i}" ${e.section?`data-section="${e.section}"`:""}>\n ${e.icon?`<span class="sidebar-icon" data-icon="${e.icon}" data-size="18"></span>`:""}\n <span class="sidebar-text">${e.text}</span>\n ${e.badge?`<span class="sidebar-badge">${e.badge}</span>`:""}\n </a>\n `,r&&(o+=`<div class="sidebar-submenu" ${a?'style="display: block;"':""}>`,o+=this._renderItems(e.items,t+1,i),o+="</div>"),o+="</li>"}),o+="</ul>",o}_bindEvents(){this._toggle&&this._addEventListener(this._toggle,"click",e=>{e.stopPropagation();window.innerWidth>=this.options.collapseAt&&this.options.collapsibleDesktop?this.toggleCollapse():this.toggle()}),this._addEventListener(this.element,"click",e=>{const t=e.target.closest(".sidebar-link:not(.sidebar-link-toggle)");if(t){const n=t.dataset.path,o=this._getItemByPath(n);o&&o.section&&this.setActive(o.section),this.options.onItemClick&&this.options.onItemClick(o,n,e),window.innerWidth<this.options.collapseAt&&this.close()}}),this._addEventListener(this.element,"click",e=>{const t=e.target.closest(".sidebar-link-toggle");if(t){e.preventDefault();const n=t.dataset.path,o=t.closest(".sidebar-item");this._toggleSubmenu(o,n)}}),this._addEventListener(window,"resize",()=>{window.innerWidth>=this.options.collapseAt&&this.close()}),this._addEventListener(document,"click",e=>{this._isOpen&&!this.element.contains(e.target)&&window.innerWidth<this.options.collapseAt&&this.close()})}_toggleSubmenu(e,t){const n=e.querySelector(":scope > .sidebar-submenu");if(!n)return;const o=e.classList.contains("open"),s=this._getItemByPath(t),i=parseInt(e.dataset.depth,10);o?(this._collapseSubmenu(e,n),this._expandedItems.delete(t),this.options.onCollapse&&this.options.onCollapse(s,i)):(this._expandSubmenu(e,n),this._expandedItems.add(t),this.options.onExpand&&this.options.onExpand(s,i)),this._saveExpandedState()}_expandSubmenu(e,t){e.classList.add("open"),t.style.display="block";const n=t.scrollHeight;t.style.height="0",t.style.overflow="hidden",requestAnimationFrame(()=>{t.style.transition=`height ${this.options.animationDuration}ms ease`,t.style.height=`${n}px`,setTimeout(()=>{t.style.height="",t.style.overflow="",t.style.transition=""},this.options.animationDuration)})}_collapseSubmenu(e,t){const n=t.scrollHeight;t.style.height=`${n}px`,t.style.overflow="hidden",requestAnimationFrame(()=>{t.style.transition=`height ${this.options.animationDuration}ms ease`,t.style.height="0",setTimeout(()=>{e.classList.remove("open"),t.style.display="",t.style.height="",t.style.overflow="",t.style.transition=""},this.options.animationDuration)})}_getItemByPath(e){if(!e)return null;const t=e.split(".").map(e=>parseInt(e,10));let n=this.options.items;for(const e of t){if(!n||!n[e])return null;n=n[e],n.items&&t.indexOf(e)<t.length-1&&(n=n.items)}return n}_scanIcons(){void 0!==window.Domma&&window.Domma.icons&&window.Domma.icons.scan&&window.Domma.icons.scan(this.element)}_loadExpandedState(){if(this.options.persistExpanded&&this.options.persistKey)try{const e=`domma:sidebar:expanded:${this.options.persistKey}`,t=localStorage.getItem(e);if(t){const e=JSON.parse(t);this._expandedItems=new Set(e)}}catch(e){console.warn("Failed to load sidebar expanded state:",e)}}_saveExpandedState(){if(this.options.persistExpanded&&this.options.persistKey)try{const e=`domma:sidebar:expanded:${this.options.persistKey}`,t=Array.from(this._expandedItems);localStorage.setItem(e,JSON.stringify(t))}catch(e){console.warn("Failed to save sidebar expanded state:",e)}}_loadCollapsedState(){if(this.options.persistCollapsed&&this.options.persistCollapseKey)try{const e=`domma:sidebar:collapsed:${this.options.persistCollapseKey}`,t=localStorage.getItem(e);null!==t&&(this._isCollapsed="true"===t)}catch(e){console.warn("Failed to load sidebar collapsed state:",e)}}_saveCollapsedState(){if(this.options.persistCollapsed&&this.options.persistCollapseKey)try{const e=`domma:sidebar:collapsed:${this.options.persistCollapseKey}`;localStorage.setItem(e,this._isCollapsed.toString())}catch(e){console.warn("Failed to save sidebar collapsed state:",e)}}_initScrollSpy(){const e=[];this.element.querySelectorAll(".sidebar-link[data-section]").forEach(t=>{const n=t.dataset.section,o=document.getElementById(n);o&&e.push({element:o,id:n,link:t})}),0!==e.length&&(this._scrollSpyObserver=new IntersectionObserver(t=>{t.forEach(t=>{if(t.isIntersecting){const n=e.find(e=>e.element===t.target);n&&this.setActive(n.id)}})},{threshold:this.options.scrollSpyThreshold,rootMargin:this.options.scrollSpyOffset}),e.forEach(({element:e})=>{this._scrollSpyObserver.observe(e)}))}_createOverlay(){this._overlay||(this._overlay=document.createElement("div"),this._overlay.className="sidebar-overlay",document.body.appendChild(this._overlay),this._addEventListener(this._overlay,"click",()=>{this.close()}))}_removeOverlay(){this._overlay&&(this._overlay.remove(),this._overlay=null)}_applyPush(){if(!this.options.push||!this._contentElement)return;const e="right"===this.options.position?"sidebar-push-active-right":"sidebar-push-active";this._contentElement.classList.add(e),this._contentElement.style.setProperty("--sidebar-push-width",this.options.width)}_removePush(){this.options.push&&this._contentElement&&this._contentElement.classList.remove("sidebar-push-active","sidebar-push-active-right")}open(){return this._isOpen||(this._isOpen=!0,this.element.classList.add("open"),this._toggle&&this._toggle.setAttribute("aria-expanded","true"),window.innerWidth<this.options.collapseAt&&this._createOverlay(),this._applyPush(),this.options.onToggle&&this.options.onToggle(!0)),this}close(){return this._isOpen?(this._isOpen=!1,this.element.classList.remove("open"),this._toggle&&this._toggle.setAttribute("aria-expanded","false"),this._removeOverlay(),this._removePush(),this.options.onToggle&&this.options.onToggle(!1),this):this}toggle(){return this._isOpen?this.close():this.open()}isOpen(){return this._isOpen}collapse(){return!this.options.collapsibleDesktop||this._isCollapsed||(this._isCollapsed=!0,this.element.classList.add("sidebar-collapsed"),this._saveCollapsedState(),this._createFloatingToggle(),this._removePush(),this.options.onCollapse&&this.options.onCollapse()),this}expand(){if(!this.options.collapsibleDesktop||!this._isCollapsed)return this;this._isCollapsed=!1,this.element.classList.remove("sidebar-collapsed"),this._saveCollapsedState(),this._removeFloatingToggle(),this._applyPush();const e="right"===this.options.position?"chevron-right":"chevron-left";return this._updateToggleIcon(e),this.options.onExpand&&this.options.onExpand(),this}_createFloatingToggle(){if(this._floatingToggle)return;this._floatingToggle=document.createElement("button"),this._floatingToggle.className="sidebar-floating-toggle show","right"===this.options.position&&this._floatingToggle.classList.add("right");const e="right"===this.options.position?"chevron-left":"chevron-right";this._floatingToggle.innerHTML=`<span data-icon="${e}" data-size="20"></span>`,this._floatingToggle.addEventListener("click",()=>{this.expand()}),document.body.appendChild(this._floatingToggle),void 0!==window.Domma&&window.Domma.icons&&window.Domma.icons.scan&&window.Domma.icons.scan(this._floatingToggle)}_removeFloatingToggle(){this._floatingToggle&&(this._floatingToggle.remove(),this._floatingToggle=null)}_updateToggleIcon(e){if(!this._toggle)return;const t=this._toggle.querySelector(".sidebar-toggle-icon");t&&(t.setAttribute("data-icon",e),void 0!==window.Domma&&window.Domma.icons&&window.Domma.icons.scan&&window.Domma.icons.scan(this._toggle))}destroy(){this._removeFloatingToggle(),super.destroy()}toggleCollapse(){return this._isCollapsed?this.expand():this.collapse()}isCollapsed(){return this._isCollapsed}setActive(e){return this.options.activeSection=e,this.element.querySelectorAll(".sidebar-link").forEach(t=>{t.dataset.section===e?t.classList.add("active"):t.classList.remove("active")}),this}setItems(e){return this.options.items=e,this._expandedItems.clear(),this._render(),this._bindEvents(),this._scanIcons(),this}addItem(e,t=null){return null===t||t>=this.options.items.length?this.options.items.push(e):this.options.items.splice(t,0,e),this._render(),this._bindEvents(),this._scanIcons(),this}removeItem(e){return e>=0&&e<this.options.items.length&&(this.options.items.splice(e,1),this._render(),this._bindEvents(),this._scanIcons()),this}expandAll(){return this.element.querySelectorAll(".sidebar-item.has-children").forEach(e=>{const t=e.dataset.path,n=e.querySelector(":scope > .sidebar-submenu");n&&!e.classList.contains("open")&&(this._expandSubmenu(e,n),this._expandedItems.add(t))}),this._saveExpandedState(),this}collapseAll(){return this.element.querySelectorAll(".sidebar-item.has-children.open").forEach(e=>{const t=e.dataset.path,n=e.querySelector(":scope > .sidebar-submenu");n&&(this._collapseSubmenu(e,n),this._expandedItems.delete(t))}),this._saveExpandedState(),this}destroy(){this._scrollSpyObserver&&(this._scrollSpyObserver.disconnect(),this._scrollSpyObserver=null),this._removeOverlay(),super.destroy()}}class P extends h{static defaults={variant:"light",layout:"simple",brand:null,columns:[],links:[],social:[],copyright:null,className:"",position:"static"};constructor(e,t={}){super(e,t),this._init()}_init(){this.element&&(this._render(),this._scanIcons())}_render(){const{variant:e,layout:t,brand:n,columns:o,links:s,social:i,copyright:r,className:a,position:l}=this.options;this.element.className="footer",this.element.classList.add(`footer-${e}`),this.element.classList.add(`footer-${t}`),"static"!==l&&this.element.classList.add(`footer-${l}`),a&&this.element.classList.add(a),this.element.setAttribute("role","contentinfo");let d='<div class="footer-container">';"columns"===t&&o&&o.length>0?d+=this._renderColumnsLayout(n,o,i,r):d+="minimal"===t?this._renderMinimalLayout(r,i):this._renderSimpleLayout(n,s,i,r),d+="</div>",this.element.innerHTML=d}_renderSimpleLayout(e,t,n,o){let s='<div class="footer-simple-content">';return e&&(s+='<div class="footer-brand">',e.url&&(s+=`<a href="${e.url}" class="footer-brand-link">`),e.logo&&(s+=`<img src="${e.logo}" alt="${e.text||""}" class="footer-logo">`),e.text&&(s+=`<span class="footer-brand-text">${e.text}</span>`),e.url&&(s+="</a>"),s+="</div>"),t&&t.length>0&&(s+='<nav class="footer-nav">',t.forEach(e=>{const t=e.icon?`<span data-icon="${e.icon}" data-size="16" style="margin-right: 6px; vertical-align: middle;"></span>`:"";s+=`<a href="${e.url||"#"}" class="footer-link">${t}${e.text}</a>`}),s+="</nav>"),n&&n.length>0&&(s+=this._renderSocial(n)),s+="</div>",o&&(s+=this._renderCopyright(o)),s}_renderColumnsLayout(e,t,n,o){let s="";return s+='<div class="footer-columns-content">',e&&(s+='<div class="footer-column footer-column-brand">',e.logo&&(s+=`<img src="${e.logo}" alt="${e.text||""}" class="footer-logo">`),e.text&&(s+=`<p class="footer-brand-text">${e.text}</p>`),e.description&&(s+=`<p class="footer-brand-description">${e.description}</p>`),s+="</div>"),t.forEach(e=>{s+='<div class="footer-column">',e.title&&(s+=`<h4 class="footer-column-title">${e.title}</h4>`),e.links&&e.links.length>0&&(s+='<ul class="footer-column-links">',e.links.forEach(e=>{const t=e.icon?`<span data-icon="${e.icon}" data-size="16" style="margin-right: 6px; vertical-align: middle;"></span>`:"";s+=`<li><a href="${e.url||"#"}" class="footer-column-link">${t}${e.text}</a></li>`}),s+="</ul>"),s+="</div>"}),s+="</div>",s+='<div class="footer-bottom">',n&&n.length>0&&(s+=this._renderSocial(n)),o&&(s+=this._renderCopyright(o)),s+="</div>",s}_renderMinimalLayout(e,t){let n='<div class="footer-minimal-content">';return e&&(n+=this._renderCopyright(e)),t&&t.length>0&&(n+=this._renderSocial(t)),n+="</div>",n}_renderSocial(e){let t='<div class="footer-social">';return e.forEach(e=>{t+=`\n <a href="${e.url||"#"}" class="footer-social-link" aria-label="${e.label||e.icon}" target="_blank" rel="noopener noreferrer">\n <span data-icon="${e.icon}" data-size="20"></span>\n </a>\n `}),t+="</div>",t}_renderCopyright(e){return`<div class="footer-copyright">${"string"==typeof e?e:e.text||`© ${e.year||(new Date).getFullYear()} All rights reserved`}</div>`}_scanIcons(){void 0!==window.Domma&&window.Domma.icons&&window.Domma.icons.scan&&window.Domma.icons.scan(this.element)}setBrand(e){return this.options.brand=e,this._render(),this._scanIcons(),this}setLinks(e){return this.options.links=e,this._render(),this._scanIcons(),this}setColumns(e){return this.options.columns=e,this._render(),this._scanIcons(),this}setSocial(e){return this.options.social=e,this._render(),this._scanIcons(),this}setCopyright(e){return this.options.copyright=e,this._render(),this}}class R extends h{static defaults={data:[],dataSource:null,minChars:1,maxResults:10,debounce:300,filterFn:null,renderItem:null,highlightMatches:!0,position:"auto",placeholder:"",emptyMessage:"No results found",loadingMessage:"Loading...",caseSensitive:!1,selectOnEnter:!0,clearOnSelect:!1,onSelect:null,onChange:null,onOpen:null,onClose:null,onFilter:null};constructor(e,t={}){super(e,t),this.model=t.model||null,this.modelKey=t.modelKey||null,this._isOpen=!1,this._activeIndex=-1,this._filteredData=[],this._loading=!1,this._debounceTimer=null,this._dropdown=null,this._list=null,this._loadingEl=null,this._emptyEl=null,this._init();const n=e=>{e!==this.getValue()&&this.setValue(e)};this.model&&"function"==typeof this.model.onFieldChange?this._modelUnsubscribe=this.model.onFieldChange(this.modelKey,n):this.model&&"function"==typeof this.model.onChange&&(this._modelUnsubscribe=this.model.onChange(({field:e,newValue:t})=>{e===this.modelKey&&n(t)}))}_init(){this.element&&("INPUT"===this.element.tagName?(this.options.placeholder&&this.element.setAttribute("placeholder",this.options.placeholder),this._createDropdown(),this._bindEvents(),this.element.setAttribute("role","combobox"),this.element.setAttribute("aria-autocomplete","list"),this.element.setAttribute("aria-expanded","false"),this.element.setAttribute("aria-controls",this._dropdown.id)):console.error("Autocomplete requires an input element"))}_createDropdown(){let e=this.element.parentElement;e&&e.classList.contains("dm-autocomplete")||(e=document.createElement("div"),e.className="dm-autocomplete",this.element.parentNode.insertBefore(e,this.element),e.appendChild(this.element)),this._dropdown=document.createElement("div"),this._dropdown.className="dm-autocomplete-dropdown",this._dropdown.id=`autocomplete-${Math.random().toString(36).substr(2,9)}`,this._dropdown.setAttribute("role","listbox"),this._dropdown.style.display="none",this._loadingEl=document.createElement("div"),this._loadingEl.className="dm-autocomplete-loading",this._loadingEl.textContent=this.options.loadingMessage,this._loadingEl.style.display="none",this._dropdown.appendChild(this._loadingEl),this._emptyEl=document.createElement("div"),this._emptyEl.className="dm-autocomplete-empty",this._emptyEl.textContent=this.options.emptyMessage,this._emptyEl.style.display="none",this._dropdown.appendChild(this._emptyEl),this._list=document.createElement("ul"),this._list.className="dm-autocomplete-list",this._dropdown.appendChild(this._list),e.appendChild(this._dropdown)}_bindEvents(){const e=this._handleInput.bind(this),t=this._handleKeydown.bind(this);this._addEventListener(this.element,"input",e),this._addEventListener(this.element,"keydown",t),this._addEventListener(this.element,"focus",()=>{this.element.value.length>=this.options.minChars&&this._filterData(this.element.value)}),this._addEventListener(this.element,"blur",e=>{setTimeout(()=>{this._dropdown.contains(document.activeElement)||this.close()},200)})}_handleInput(e){const t=e.target.value;this._debounceTimer&&clearTimeout(this._debounceTimer),this.model&&this.modelKey&&this.model.set(this.modelKey,t),this.options.onChange&&this.options.onChange(t,e),t.length<this.options.minChars?this.close():this._debounceTimer=setTimeout(()=>{this._filterData(t)},this.options.debounce)}_handleKeydown(e){if(!this._isOpen)return void("ArrowDown"===e.key&&this.element.value.length>=this.options.minChars&&(e.preventDefault(),this._filterData(this.element.value)));const t=this._list.querySelectorAll(".dm-autocomplete-item");switch(e.key){case"ArrowDown":e.preventDefault(),this._activeIndex=Math.min(this._activeIndex+1,t.length-1),this._updateActive();break;case"ArrowUp":e.preventDefault(),this._activeIndex=Math.max(this._activeIndex-1,-1),this._updateActive();break;case"Enter":e.preventDefault(),this._activeIndex>=0&&this.options.selectOnEnter&&this._selectItem(this._activeIndex);break;case"Escape":e.preventDefault(),this.close();break;case"Tab":this._activeIndex>=0&&(e.preventDefault(),this._selectItem(this._activeIndex)),this.close()}}async _filterData(e){let t=[];if(this.options.dataSource){this._setLoading(!0);try{t=await this.options.dataSource(e)}catch(e){console.error("Autocomplete dataSource error:",e),t=[]}this._setLoading(!1)}else{const n=this.options.filterFn||this._defaultFilter.bind(this);t=this.options.data.filter(t=>n(t,e))}this.options.maxResults&&(t=t.slice(0,this.options.maxResults)),this.options.onFilter&&(t=this.options.onFilter(t,e)||t),this._filteredData=t,this._renderResults(e)}_defaultFilter(e,t){const n="string"==typeof e?e:e.label||e.value||String(e),o=this.options.caseSensitive?t:t.toLowerCase();return(this.options.caseSensitive?n:n.toLowerCase()).includes(o)}_renderResults(e){if(this._list.innerHTML="",this._activeIndex=-1,0===this._filteredData.length)return this._emptyEl.style.display="block",this._list.style.display="none",void this.open();this._emptyEl.style.display="none",this._list.style.display="block",this._filteredData.forEach((t,n)=>{const o=document.createElement("li");if(o.className="dm-autocomplete-item",o.setAttribute("role","option"),o.setAttribute("data-index",n),this.options.renderItem){const n=this.options.renderItem(t,e);o.innerHTML="string"==typeof n?n:"","string"!=typeof n&&o.appendChild(n)}else{const n="string"==typeof t?t:t.label||t.value||String(t);this.options.highlightMatches?o.innerHTML=this._highlightMatch(n,e):o.textContent=n}o.addEventListener("click",()=>{this._selectItem(n)}),o.addEventListener("mouseenter",()=>{this._activeIndex=n,this._updateActive()}),this._list.appendChild(o)}),this.open()}_highlightMatch(e,t){if(!t)return e;const n=new RegExp(`(${this._escapeRegex(t)})`,this.options.caseSensitive?"g":"gi");return e.replace(n,'<span class="dm-autocomplete-match">$1</span>')}_escapeRegex(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}_updateActive(){const e=this._list.querySelectorAll(".dm-autocomplete-item");if(e.forEach((e,t)=>{t===this._activeIndex?(e.classList.add("active"),e.setAttribute("aria-selected","true"),e.scrollIntoView({block:"nearest"})):(e.classList.remove("active"),e.setAttribute("aria-selected","false"))}),this._activeIndex>=0){const t=e[this._activeIndex];if(t){const e=t.id||`autocomplete-item-${this._activeIndex}`;t.id=e,this.element.setAttribute("aria-activedescendant",e)}}else this.element.removeAttribute("aria-activedescendant")}_selectItem(e){const t=this._filteredData[e];if(!t)return;const n="string"==typeof t?t:t.value||t.label||String(t);this.element.value=n,this.options.onSelect&&this.options.onSelect(t,{target:this.element}),this.options.clearOnSelect&&setTimeout(()=>{this.element.value=""},100),this.close(),this.element.focus()}_setLoading(e){this._loading=e,e?(this._loadingEl.style.display="block",this._list.style.display="none",this._emptyEl.style.display="none",this.open()):this._loadingEl.style.display="none"}_updatePosition(){if(!this._isOpen||!this._dropdown)return;const e=this.element.getBoundingClientRect(),t=this._dropdown.offsetHeight,n=window.innerHeight;let o=this.options.position;if("auto"===o){const s=n-e.bottom,i=e.top;o=s>=t||s>=i?"below":"above"}"above"===o?(this._dropdown.style.top="auto",this._dropdown.style.bottom="100%",this._dropdown.style.marginBottom="4px",this._dropdown.style.marginTop="0"):(this._dropdown.style.top="100%",this._dropdown.style.bottom="auto",this._dropdown.style.marginTop="4px",this._dropdown.style.marginBottom="0")}open(){return this._isOpen||(this._isOpen=!0,this._dropdown.style.display="block",this.element.setAttribute("aria-expanded","true"),this._updatePosition(),this.options.onOpen&&this.options.onOpen()),this}close(){return this._isOpen?(this._isOpen=!1,this._dropdown.style.display="none",this.element.setAttribute("aria-expanded","false"),this._activeIndex=-1,this.options.onClose&&this.options.onClose(),this):this}toggle(){return this._isOpen?this.close():this.open()}isOpen(){return this._isOpen}setValue(e){return this.element.value=e,this}getValue(){return this.element.value}setData(e){return this.options.data=e,this}refresh(){const e=this.element.value;return e.length>=this.options.minChars&&this._filterData(e),this}focus(){return this.element.focus(),this}clearValue(){return this.element.value="",this.close(),this}destroy(){this.close(),this._dropdown&&this._dropdown.parentNode&&this._dropdown.parentNode.removeChild(this._dropdown),this._debounceTimer&&clearTimeout(this._debounceTimer),this._modelUnsubscribe&&this._modelUnsubscribe(),super.destroy()}}class F extends h{static defaults={data:[],value:[],placeholder:"Add items...",searchable:!0,creatable:!1,maxItems:null,duplicates:!1,clearable:!0,size:"medium",renderPill:null,renderOption:null,pillTemplate:"<span>{label}</span>",validatePill:null,maxItemsMessage:"Maximum {max} items allowed",duplicateMessage:"Item already exists",noResultsMessage:"No results found",onAdd:null,onRemove:null,onChange:null,onCreate:null,onMaxReached:null,onValidationError:null};constructor(e,t={}){super(e,t),this.model=t.model||null,this.modelKey=t.modelKey||null,this._pills=[],this._isOpen=!1,this._activeIndex=-1,this._container=null,this._input=null,this._clearBtn=null,this._dropdown=null,this._optionsList=null,this._filteredData=[],this._init();const n=e=>{if(!Array.isArray(e))return;const t=this.getValue();JSON.stringify(t)!==JSON.stringify(e)&&this.setValue(e)};this._container&&(this.model&&"function"==typeof this.model.onFieldChange?this._modelUnsubscribe=this.model.onFieldChange(this.modelKey,n):this.model&&"function"==typeof this.model.onChange&&(this._modelUnsubscribe=this.model.onChange(({field:e,newValue:t})=>{e===this.modelKey&&n(t)})))}_init(){this.element&&("INPUT"===this.element.tagName?(this.element.style.display="none",this._createStructure(),this.options.value&&this.options.value.length>0&&this.options.value.forEach(e=>{const t=this._findItemByValue(e);t?this._addPill(t.value,t.label):"string"==typeof e&&this._addPill(e,e)}),this._bindEvents(),this._input.setAttribute("role","combobox"),this._input.setAttribute("aria-autocomplete","list"),this._input.setAttribute("aria-expanded","false")):console.error("Pillbox requires an input element"))}_createStructure(){const e=document.createElement("div");if(e.className=`dm-pillbox dm-pillbox-${this.options.size}`,this._container=document.createElement("div"),this._container.className="dm-pillbox-container",this._input=document.createElement("input"),this._input.type="text",this._input.className="dm-pillbox-input",this._input.placeholder=this.options.placeholder,this._container.appendChild(this._input),e.appendChild(this._container),this.options.clearable&&(this._clearBtn=document.createElement("button"),this._clearBtn.type="button",this._clearBtn.className="dm-pillbox-clear",this._clearBtn.innerHTML="&times;",this._clearBtn.title="Clear all",this._clearBtn.style.display="none",e.appendChild(this._clearBtn)),this.options.searchable){this._dropdown=document.createElement("div"),this._dropdown.className="dm-pillbox-dropdown",this._dropdown.style.display="none",this._optionsList=document.createElement("ul"),this._optionsList.className="dm-pillbox-options",this._dropdown.appendChild(this._optionsList);const t=document.createElement("div");t.className="dm-pillbox-empty",t.textContent=this.options.noResultsMessage,t.style.display="none",this._dropdown.appendChild(t),e.appendChild(this._dropdown)}this.element.parentNode.insertBefore(e,this.element.nextSibling),this._wrapper=e}_bindEvents(){const e=this._handleInput.bind(this),t=this._handleKeydown.bind(this);this._addEventListener(this._input,"input",e),this._addEventListener(this._input,"keydown",t),this._addEventListener(this._input,"focus",()=>{this.options.searchable&&this._input.value&&this._filterOptions(this._input.value)}),this._addEventListener(this._input,"blur",()=>{setTimeout(()=>{this._dropdown?.contains(document.activeElement)||this.close()},200)}),this._clearBtn&&this._addEventListener(this._clearBtn,"click",()=>{this.clear(),this._input.focus()}),this._addEventListener(this._container,"click",e=>{e.target===this._container&&this._input.focus()})}_handleInput(e){const t=e.target.value;this.options.searchable&&t?this._filterOptions(t):this.close()}_handleKeydown(e){const t=this._input.value;if("Backspace"===e.key&&!t&&this._pills.length>0){e.preventDefault();const t=this._container.querySelectorAll(".dm-pill")[this._pills.length-1];return void this._removePill(t)}if("Enter"===e.key&&t)return e.preventDefault(),void(this._isOpen&&this._activeIndex>=0?this._selectOption(this._activeIndex):this.options.creatable&&this._createPill(t));if(this._isOpen){const t=this._optionsList.querySelectorAll(".dm-pillbox-option");switch(e.key){case"ArrowDown":e.preventDefault(),this._activeIndex=Math.min(this._activeIndex+1,t.length-1),this._updateActive();break;case"ArrowUp":e.preventDefault(),this._activeIndex=Math.max(this._activeIndex-1,-1),this._updateActive();break;case"Escape":e.preventDefault(),this.close();break;case"Tab":this.close()}}}_filterOptions(e){const t=e.toLowerCase(),n=this._pills.map(e=>e.value);this._filteredData=this.options.data.filter(e=>{const o="string"==typeof e?e:e.value,s="string"==typeof e?e:e.label||e.value;return!n.includes(o)&&(!e.disabled&&s.toLowerCase().includes(t))}),this._renderOptions()}_renderOptions(){this._optionsList.innerHTML="",this._activeIndex=-1;const e=this._dropdown.querySelector(".dm-pillbox-empty");if(0===this._filteredData.length)return e.style.display="block",this._optionsList.style.display="none",void this.open();e.style.display="none",this._optionsList.style.display="block",this._filteredData.forEach((e,t)=>{const n=document.createElement("li");if(n.className="dm-pillbox-option",n.setAttribute("data-index",t),this.options.renderOption){const t=this.options.renderOption(e);n.innerHTML="string"==typeof t?t:"","string"!=typeof t&&n.appendChild(t)}else{const t="string"==typeof e?e:e.label||e.value;n.textContent=t}n.addEventListener("click",()=>{this._selectOption(t)}),n.addEventListener("mouseenter",()=>{this._activeIndex=t,this._updateActive()}),this._optionsList.appendChild(n)}),this.open()}_updateActive(){this._optionsList.querySelectorAll(".dm-pillbox-option").forEach((e,t)=>{t===this._activeIndex?(e.classList.add("active"),e.scrollIntoView({block:"nearest"})):e.classList.remove("active")})}_selectOption(e){const t=this._filteredData[e];if(!t)return;const n="string"==typeof t?t:t.value,o="string"==typeof t?t:t.label||t.value;this._addPill(n,o),this._input.value="",this.close(),this._input.focus()}_createPill(e){if(!e.trim())return;const t=this._validate(e);t?this.options.onValidationError&&this.options.onValidationError(t,e):(this._addPill(e,e),this._input.value="",this.options.onCreate&&this.options.onCreate(e))}_addPill(e,t){const n=this._validate(e);if(n)return void(this.options.onValidationError&&this.options.onValidationError(n,e));const o=document.createElement("div");if(o.className="dm-pill",o.setAttribute("data-value",e),this.options.renderPill){const n=this.options.renderPill({value:e,label:t});o.innerHTML="string"==typeof n?n:"","string"!=typeof n&&o.appendChild(n)}else{const e=this.options.pillTemplate.replace("{label}",t);o.innerHTML=e}const s=document.createElement("button");s.type="button",s.className="dm-pill-remove",s.innerHTML="&times;",s.title=`Remove ${t}`,s.addEventListener("click",e=>{e.stopPropagation(),this._removePill(o)}),o.appendChild(s),this._container.insertBefore(o,this._input),this._pills.push({value:e,label:t,element:o}),this._updateHiddenInput(),this._clearBtn&&(this._clearBtn.style.display="block"),this.options.onAdd&&this.options.onAdd(e,o),this._triggerChange()}_removePill(e){const t=e.getAttribute("data-value"),n=this._pills.findIndex(e=>e.value===t);-1!==n&&(this._pills[n],e.remove(),this._pills.splice(n,1),this._updateHiddenInput(),0===this._pills.length&&this._clearBtn&&(this._clearBtn.style.display="none"),this.options.onRemove&&this.options.onRemove(t,e),this._triggerChange())}_validate(e){if(this.options.maxItems&&this._pills.length>=this.options.maxItems)return this.options.onMaxReached&&this.options.onMaxReached(),this.options.maxItemsMessage.replace("{max}",this.options.maxItems);if(!this.options.duplicates&&this._pills.some(t=>t.value===e))return this.options.duplicateMessage;if(this.options.validatePill){const t=this.options.validatePill(e);if(!0!==t&&void 0!==t)return"string"==typeof t?t:"Invalid value"}return null}_findItemByValue(e){return this.options.data.find(t=>("string"==typeof t?t:t.value)===e)}_updateHiddenInput(){const e=this._pills.map(e=>e.value);this.element.value=JSON.stringify(e)}_triggerChange(){const e=this.getValue();this.model&&this.modelKey&&this.model.set(this.modelKey,e),this.options.onChange&&this.options.onChange(e)}open(){return!this._dropdown||this._isOpen||(this._isOpen=!0,this._dropdown.style.display="block",this._input.setAttribute("aria-expanded","true")),this}close(){return this._dropdown&&this._isOpen?(this._isOpen=!1,this._dropdown.style.display="none",this._input.setAttribute("aria-expanded","false"),this._activeIndex=-1,this):this}isOpen(){return this._isOpen}getValue(){return this._pills.map(e=>e.value)}setValue(e){return this.clear(),Array.isArray(e)&&e.forEach(e=>{const t=this._findItemByValue(e);if(t){const n="string"==typeof t?t:t.label||t.value;this._addPill(e,n)}else"string"==typeof e&&this._addPill(e,e)}),this}addPill(e,t){return t=t||e,this._addPill(e,t),this}removePill(e){const t=this._container.querySelector(`.dm-pill[data-value="${e}"]`);return t&&this._removePill(t),this}removePillAt(e){return e>=0&&e<this._pills.length&&this._removePill(this._pills[e].element),this}clear(){return[...this._pills].forEach(e=>{this._removePill(e.element)}),this}getCount(){return this._pills.length}setData(e){return this.options.data=e,this}focus(){return this._input.focus(),this}enable(){return this._input.disabled=!1,this._wrapper.classList.remove("disabled"),this}disable(){return this._input.disabled=!0,this._wrapper.classList.add("disabled"),this.close(),this}destroy(){this.close(),this._wrapper&&this._wrapper.parentNode&&this._wrapper.parentNode.removeChild(this._wrapper),this.element.style.display="",this._modelUnsubscribe&&this._modelUnsubscribe(),super.destroy()}}class q extends h{static defaults={position:"right",size:"lg",backdrop:!0,backdropClose:!0,keyboard:!0,animation:!0,animationDuration:300,closeOnEscape:!0,title:"",content:"",closable:!0,closeIcon:"x",headerClass:"",bodyClass:"",footerClass:"",customSizes:{},onOpen:null,onClose:null,onClosed:null};constructor(e,t={}){super(e,t),this._isOpen=!1,this._backdrop=null,this._originalBodyOverflow=null,this._keydownHandler=null,this._init()}_init(){this.element&&(this._setupElement(),this._bindEvents())}_setupElement(){const e=this.element;this.options,e.classList.add("dm-slideover"),e.style.position="fixed",e.style.top="0",e.style.height="100vh",e.style.backgroundColor="var(--dm-surface, #fff)",e.style.boxShadow=this._getBoxShadow(),e.style.zIndex="9999",e.style.display="none",e.style.flexDirection="column",e.style.overflow="hidden",this._applyPosition(),this._applySize(),this._applyAnimation()}_applyPosition(){const e=this.element,t=this.options.position;switch(e.classList.remove("dm-slideover-left","dm-slideover-right","dm-slideover-top","dm-slideover-bottom"),e.classList.add(`dm-slideover-${t}`),t){case"left":e.style.left="-100%",e.style.right="auto",e.style.top="0",e.style.bottom="0",e.style.width=this._getSizeValue(),e.style.height="100vh";break;case"right":e.style.right="-100%",e.style.left="auto",e.style.top="0",e.style.bottom="0",e.style.width=this._getSizeValue(),e.style.height="100vh";break;case"top":e.style.top="-100%",e.style.bottom="auto",e.style.left="0",e.style.right="0",e.style.width="100vw",e.style.height=this._getSizeValue();break;case"bottom":e.style.bottom="-100%",e.style.top="auto",e.style.left="0",e.style.right="0",e.style.width="100vw",e.style.height=this._getSizeValue()}}_applySize(){const e=this._getSizeValue(),t=this.options.position;["left","right"].includes(t)?this.element.style.width=e:this.element.style.height=e}_getSizeValue(){const{size:e,customSizes:t}=this.options;if(t&&t[e])return t[e];const n={sm:"25%",md:"50%",lg:"75%",xl:"90%",full:"100%"};return"string"==typeof e&&(e.includes("px")||e.includes("%")||e.includes("rem")||e.includes("em"))?e:n[e]||n.lg}_applyAnimation(){this.options.animation?this.element.style.transition=`all ${this.options.animationDuration}ms ease`:this.element.style.transition="none"}_getBoxShadow(){switch(this.options.position){case"left":return"2px 0 8px rgba(0,0,0,0.15)";case"right":default:return"-2px 0 8px rgba(0,0,0,0.15)";case"top":return"0 2px 8px rgba(0,0,0,0.15)";case"bottom":return"0 -2px 8px rgba(0,0,0,0.15)"}}_bindEvents(){if(this.options.closable){const e=this.element.querySelector('[data-dismiss="slideover"], .dm-slideover-close');e&&this._addEventListener(e,"click",()=>this.close())}this._keydownHandler=e=>{this._isOpen&&this.options.keyboard&&"Escape"===e.key&&this.options.closeOnEscape&&this.close()}}_createBackdrop(){this.options.backdrop&&(this._backdrop=document.createElement("div"),this._backdrop.className="dm-slideover-backdrop",this._backdrop.style.cssText=`\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.5);\n z-index: 9998;\n display: none;\n transition: opacity ${this.options.animationDuration}ms ease;\n opacity: 0;\n `,this.options.backdropClose&&this._backdrop.addEventListener("click",()=>this.close()),document.body.appendChild(this._backdrop))}_showBackdrop(){this._backdrop&&(this._backdrop.style.display="block",requestAnimationFrame(()=>{this._backdrop.style.opacity="1"}))}_hideBackdrop(){this._backdrop&&(this._backdrop.style.opacity="0",setTimeout(()=>{this._backdrop&&(this._backdrop.style.display="none")},this.options.animationDuration))}_getOpenPosition(){switch(this.options.position){case"left":return{left:"0",right:"auto"};case"right":return{right:"0",left:"auto"};case"top":return{top:"0",bottom:"auto"};case"bottom":return{bottom:"0",top:"auto"}}}open(){if(this._isOpen)return this;const e=this.element;if(!e)return this;this.options.backdrop&&!this._backdrop&&this._createBackdrop(),this._originalBodyOverflow=document.body.style.overflow,document.body.style.overflow="hidden",this._showBackdrop(),e.style.display="flex";const t=this._getOpenPosition();return requestAnimationFrame(()=>{Object.assign(e.style,t)}),this.options.keyboard&&document.addEventListener("keydown",this._keydownHandler),this._isOpen=!0,setTimeout(()=>{this.options.onOpen&&this.options.onOpen(this),this._createForm()},this.options.animationDuration),this}_createForm(){if(this._schema&&!this._formaForm&&window.Domma&&window.Domma.forms&&window.Domma.forms.create)try{console.log("📝 Creating Forma form with schema:",this._schema);let e=this._schema;if(this._schema.fields&&Array.isArray(this._schema.fields)){e={};for(const t of this._schema.fields)t.name&&(e[t.name]={type:t.type||"string",label:t.label,required:t.required||!1,default:t.defaultValue,min:t.validation?.minLength,max:t.validation?.maxLength,pattern:t.validation?.pattern?new RegExp(t.validation.pattern):void 0,options:t.options,formConfig:{placeholder:t.placeholder,hint:t.help,rows:t.rows,accept:t.accept,multiple:t.multiple}});console.log("📝 Converted schema:",e)}const t={onSubmit:(e,t)=>(console.log("📝 Schema form submitted:",e),this._onSave&&this._onSave(e,t,this),!1),onCancel:()=>{console.log("📝 Schema form cancelled"),this.close()},layout:"stacked",showLabels:!0,showHelperText:!0,showHints:!0,cssFramework:"domma",className:"domma-form",fieldClassName:"col-6 mb-3",labelClassName:"form-label",inputClassName:"form-input",errorClassName:"form-error",helperClassName:"form-helper-text",hintClassName:"form-hint"};this._formaForm=window.Domma.forms.create(e,this._data||{},t),this._formaForm.renderTo("#schema-form-container"),console.log("📝 Forma form created and rendered successfully")}catch(e){console.error("📝 Failed to create Forma form:",e);const t=this.element.querySelector(".dm-slideover-body");t&&(t.innerHTML="<p>Form creation failed. Please try again.</p>")}}close(){if(!this._isOpen)return this;const e=this.element;if(!e)return this;if(this.options.onClose&&this.options.onClose(this),this._applyPosition(),this._hideBackdrop(),null!==this._originalBodyOverflow&&(document.body.style.overflow=this._originalBodyOverflow),this._keydownHandler&&document.removeEventListener("keydown",this._keydownHandler),this._formaForm)try{this._formaForm.destroy&&this._formaForm.destroy(),this._formaForm=null;const t=e.querySelector("#schema-form-container");t&&(t.innerHTML="")}catch(e){console.warn("Error cleaning up form:",e)}return setTimeout(()=>{e.style.display="none",this._isOpen=!1,this.options.onClosed&&this.options.onClosed(this)},this.options.animationDuration),this}toggle(){return this._isOpen?this.close():this.open()}isOpen(){return this._isOpen}setTitle(e){const t=this.element.querySelector(".dm-slideover-header .dm-slideover-title");return t&&(t.textContent=e),this}setContent(e){const t=this.element.querySelector(".dm-slideover-body");return t&&("string"==typeof e?t.innerHTML=r.sanitise(String(e)):e instanceof Element&&(t.innerHTML="",t.appendChild(e))),this}setSize(e){return this.options.size=e,this._applySize(),this}setPosition(e){return this.options.position=e,this.element.style.boxShadow=this._getBoxShadow(),this._applyPosition(),this}destroy(){this.close(),this._backdrop&&(this._backdrop.remove(),this._backdrop=null),this._keydownHandler&&document.removeEventListener("keydown",this._keydownHandler),super.destroy()}static create(e={}){const t=document.createElement("div");t.className="dm-slideover";const{title:n,content:o,schema:s,data:i={},closable:r=!0,closeIcon:a="x",onSave:l}=e;let d="";if((n||r)&&(d+='<div class="dm-slideover-header">',n&&(d+=`<h5 class="dm-slideover-title">${n}</h5>`),r&&(d+='<button type="button" class="btn btn-ghost-secondary dm-slideover-close" data-dismiss="slideover" aria-label="Close">',window.Domma&&window.Domma.icons?d+=Domma.icons.render(a,{size:20}).outerHTML:d+="&times;",d+="</button>"),d+="</div>"),d+='<div class="dm-slideover-body">',s?(d+='<div class="container-fluid p-4">',d+='<div class="card">',d+='<div class="card-body p-4">',d+='<div class="row g-3" id="schema-form-container"></div>',d+="</div>",d+="</div>",d+="</div>"):o&&(d+="string"==typeof o?o:""),d+="</div>",t.innerHTML=d,document.body.appendChild(t),o instanceof Element&&!s){const e=t.querySelector(".dm-slideover-body");e.innerHTML="",e.appendChild(o)}const c=new q(t,e);return c._schema=s,c._data=i,c._onSave=l,c}}class U extends h{static defaults={mode:"timeline",items:[],layout:"vertical",animation:!0,animationDelay:100,responsive:!0,theme:"default",clickable:!1,onItemClick:null,allowHtml:!1,yearWidth:"80px",contentMaxWidth:"600px",dateFormat:"YYYY",showConnector:!0,showProgress:!0,progressPosition:"top",statusIcons:!0,allowStatusChange:!1,onStatusChange:null,currentItem:null,completedAnimation:!0,icons:{planned:"circle","in-progress":"clock",completed:"check-circle",blocked:"alert-circle",cancelled:"x-circle"},colors:{planned:"var(--dm-gray-400)","in-progress":"var(--dm-primary)",completed:"var(--dm-success)",blocked:"var(--dm-danger)",cancelled:"var(--dm-gray-500)"}};constructor(e,t={}){super(e,t),this._init()}_init(){this.element&&(this.element.classList.add("dm-progression",`dm-progression-${this.options.mode}`,`dm-progression-${this.options.layout}`),"default"!==this.options.theme&&this.element.classList.add(`dm-progression-${this.options.theme}`),"timeline"===this.options.mode&&(this.element.classList.add("dm-timeline",`dm-timeline-${this.options.layout}`),"default"!==this.options.theme&&this.element.classList.add(`dm-timeline-${this.options.theme}`)),this._renderItems(),this._attachEvents(),this.options.animation&&this._animateItems())}_renderItems(){const e=this.options.items;Array.isArray(e)&&0!==e.length&&(this.element.innerHTML="","roadmap"===this.options.mode&&this.options.showProgress&&"top"===this.options.progressPosition&&this._renderProgressBar(),e.forEach((e,t)=>{const n="roadmap"===this.options.mode?this._renderRoadmapItem(e,t):this._renderTimelineItem(e,t);this.element.appendChild(n)}),"roadmap"===this.options.mode&&this.options.showProgress&&"bottom"===this.options.progressPosition&&this._renderProgressBar())}_renderTimelineItem(e,t){const n=document.createElement("div");return n.className="dm-progression-item dm-timeline-item",n.setAttribute("data-index",t),this.options.animation&&(n.style.opacity="0",n.style.transform="translateY(20px)",n.style.transition="opacity 0.6s ease, transform 0.6s ease"),n.innerHTML=`\n <div class="dm-progression-marker dm-timeline-year">${this._escapeHtml(e.year||e.date||"")}</div>\n <div class="dm-progression-content dm-timeline-content">\n <h4 class="dm-progression-title dm-timeline-title">${this._escapeHtml(e.title||"")}</h4>\n <p class="dm-progression-description dm-timeline-description">${this._renderContent(e.description||"")}</p>\n </div>\n `,n}_renderRoadmapItem(e,t){const n=document.createElement("div"),o=e.status||"planned",s=this.options.currentItem===e.id||this.options.currentItem===t;n.className=`dm-progression-item dm-progression-status-${o}${s?" dm-progression-current":""}`,n.setAttribute("data-index",t),n.setAttribute("data-id",e.id||t),n.setAttribute("data-status",o),this.options.animation&&(n.style.opacity="0",n.style.transform="translateY(20px)",n.style.transition="opacity 0.6s ease, transform 0.6s ease");let i='<div class="dm-progression-marker dm-progression-status-marker">';this.options.statusIcons&&this.options.icons[o]?i+=`<span class="dm-progression-status-icon" data-icon="${this.options.icons[o]}"></span>`:i+='<span class="dm-progression-status-dot"></span>',i+="</div>";let r='<div class="dm-progression-content">';return e.date&&(r+=`<div class="dm-progression-date">${this._escapeHtml(e.date)}</div>`),r+=`<h4 class="dm-progression-title">${this._escapeHtml(e.title||"")}</h4>`,e.description&&(r+=`<p class="dm-progression-description">${this._renderContent(e.description)}</p>`),"in-progress"===o&&"number"==typeof e.progress&&(r+=`\n <div class="dm-progression-item-progress">\n <div class="dm-progression-item-progress-bar" style="width: ${Math.min(100,Math.max(0,e.progress))}%"></div>\n </div>\n <div class="dm-progression-item-progress-text">${e.progress}%</div>\n `),e.priority&&(r+=`<span class="dm-progression-priority dm-progression-priority-${e.priority}">${this._escapeHtml(e.priority)}</span>`),e.tags&&Array.isArray(e.tags)&&e.tags.length>0&&(r+='<div class="dm-progression-tags">',e.tags.forEach(e=>{r+=`<span class="dm-progression-tag">${this._escapeHtml(e)}</span>`}),r+="</div>"),e.assignee&&(r+=`<div class="dm-progression-assignee">${this._escapeHtml(e.assignee)}</div>`),r+="</div>",n.innerHTML=i+r,n}_renderProgressBar(){const e=this.getProgress(),t=document.createElement("div");t.className="dm-progression-progress",t.innerHTML=`\n <div class="dm-progression-progress-bar" style="width: ${e}%"></div>\n <div class="dm-progression-progress-text">${Math.round(e)}% Complete</div>\n `,this.element.appendChild(t)}_attachEvents(){this.options.clickable&&(this._addEventListener(this.element,"click",e=>{const t=e.target.closest(".dm-progression-item");if(t){const e=parseInt(t.getAttribute("data-index"),10),n=this.options.items[e];n&&this.options.onItemClick&&this.options.onItemClick(n,e,t)}}),"roadmap"===this.options.mode&&this.options.allowStatusChange&&this._addEventListener(this.element,"click",e=>{const t=e.target.closest(".dm-progression-marker");if(t){const e=t.closest(".dm-progression-item"),n=parseInt(e.getAttribute("data-index"),10),o=this.options.items[n];o&&"completed"!==o.status&&this._cycleStatus(o,n)}}))}_cycleStatus(e,t){const n=["planned","in-progress","completed"],o=n.indexOf(e.status||"planned"),s=n[(o+1)%n.length];this.setStatus(t,s)}_animateItems(){this.element.querySelectorAll(".dm-progression-item").forEach((e,t)=>{setTimeout(()=>{e.style.opacity="1",e.style.transform="translateY(0)"},t*this.options.animationDelay)})}_escapeHtml(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}_sanitizeHtml(e){return"undefined"!=typeof DOMPurify?DOMPurify.sanitize(e,{ALLOWED_TAGS:["p","strong","em","u","br","ul","ol","li","code","pre","a","h1","h2","h3","h4","h5","h6","blockquote","span","div"],ALLOWED_ATTR:["href","target","class","id"]}):(console.warn("DOMPurify not available, falling back to HTML escaping"),this._escapeHtml(e))}_renderContent(e){return this.options.allowHtml?this._sanitizeHtml(e):this._escapeHtml(e)}_findItemIndex(e){return"number"==typeof e?e:this.options.items.findIndex(t=>t.id===e)}setItems(e){return this.options.items=e,this._renderItems(),this.options.animation&&this._animateItems(),this}addItem(e){return this.options.items.push(e),this._renderItems(),this.options.animation&&this._animateItems(),this}getItems(){return[...this.options.items]}getItem(e){const t=this._findItemIndex(e);return t>=0?{...this.options.items[t]}:null}updateItem(e,t){const n=this._findItemIndex(e);return n>=0&&(this.options.items[n]={...this.options.items[n],...t},this._renderItems(),this.options.animation&&this._animateItems()),this}removeItem(e){const t=this._findItemIndex(e);return t>=0&&(this.options.items.splice(t,1),this._renderItems(),this.options.animation&&this._animateItems()),this}setLayout(e){return this.element.classList.remove(`dm-progression-${this.options.layout}`),"timeline"===this.options.mode&&this.element.classList.remove(`dm-timeline-${this.options.layout}`),this.options.layout=e,this.element.classList.add(`dm-progression-${e}`),"timeline"===this.options.mode&&this.element.classList.add(`dm-timeline-${e}`),this}setTheme(e){return"default"!==this.options.theme&&(this.element.classList.remove(`dm-progression-${this.options.theme}`),"timeline"===this.options.mode&&this.element.classList.remove(`dm-timeline-${this.options.theme}`)),this.options.theme=e,"default"!==e&&(this.element.classList.add(`dm-progression-${e}`),"timeline"===this.options.mode&&this.element.classList.add(`dm-timeline-${e}`)),this}setMode(e){return this.element.classList.remove(`dm-progression-${this.options.mode}`),"timeline"===this.options.mode&&(this.element.classList.remove("dm-timeline",`dm-timeline-${this.options.layout}`),"default"!==this.options.theme&&this.element.classList.remove(`dm-timeline-${this.options.theme}`)),this.options.mode=e,this.element.classList.add(`dm-progression-${e}`),"timeline"===e&&(this.element.classList.add("dm-timeline",`dm-timeline-${this.options.layout}`),"default"!==this.options.theme&&this.element.classList.add(`dm-timeline-${this.options.theme}`)),this._renderItems(),this.options.animation&&this._animateItems(),this}getMode(){return this.options.mode}refresh(){return this._renderItems(),this.options.animation&&this._animateItems(),this}setStatus(e,t){const n=this._findItemIndex(e);if(n>=0){const e=this.options.items[n].status;this.options.items[n].status=t,this.options.onStatusChange&&this.options.onStatusChange(this.options.items[n],e,t),this._renderItems(),this.options.animation&&this._animateItems()}return this}getStatus(e){const t=this.getItem(e);return t?t.status:null}getItemsByStatus(e){return this.options.items.filter(t=>t.status===e)}setCurrent(e){const t=this._findItemIndex(e);return t>=0&&(this.options.currentItem=this.options.items[t].id||t,this._renderItems(),this.options.animation&&this._animateItems()),this}getCurrent(){return null===this.options.currentItem?null:this.getItem(this.options.currentItem)}getProgress(){if("roadmap"!==this.options.mode||0===this.options.items.length)return 0;const e=this.options.items.filter(e=>"completed"===e.status).length;return Math.round(e/this.options.items.length*100)}markComplete(e){return this.setStatus(e,"completed")}markInProgress(e){return this.setStatus(e,"in-progress")}markBlocked(e){return this.setStatus(e,"blocked")}}class K extends h{static defaults={width:null,height:180,penColour:"#000000",penWidth:2,format:"png",label:"Signature",guideLine:!0,placeholder:"Sign here",colours:["#000000","#1e40af","#15803d","#b91c1c"],widths:[1,2,4],toolbar:!0,name:"signature",disabled:!1,typeFallback:!1,minStrokeLength:3,respectMotionPreference:!0,onChange:null,onClear:null,onBegin:null,onEnd:null};constructor(e,t={}){super(e,t),this.element&&(this._strokes=[],this._undoneStrokes=[],this._currentStroke=null,this._mode="draw",this._isDrawing=!1,this._currentColour=this.options.penColour,this._currentWidth=this.options.penWidth,this._resizeObserver=null,this._canvas=null,this._ctx=null,this._canvasW=0,this._canvasH=0,this._dpr=1,this._render(),this._initCanvas(),this._initEvents(),this.options.disabled&&this.disable())}_esc(e){return String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}_render(){const e=this.options,t=this._esc.bind(this),n=e.colours.map(e=>{const n=t(e),o=e===this._currentColour;return`<button class="signature-colour-swatch${o?" active":""}" data-colour="${n}" style="background:${n}" aria-label="Pen colour ${n}" aria-pressed="${o}" title="${n}"></button>`}).join(""),o=e.widths.map(e=>{const t=parseFloat(e)||2,n=t===this._currentWidth,o=Math.max(2,Math.min(2.5*t,12));return`<button class="signature-width-btn${n?" active":""}" data-width="${t}" aria-label="Pen width ${t}px" aria-pressed="${n}">\n <span class="signature-width-dot" style="width:${o}px;height:${o}px;"></span>\n </button>`}).join(""),s=e.typeFallback?'\n <div class="signature-mode-toggle" role="group" aria-label="Input mode">\n <button class="signature-mode-btn active" data-mode="draw" aria-pressed="true">Draw</button>\n <button class="signature-mode-btn" data-mode="type" aria-pressed="false">Type</button>\n </div>':"",i=e.toolbar?`\n <div class="signature-toolbar">\n <span class="signature-label">${t(e.label)}</span>\n <div class="signature-colours" role="group" aria-label="Pen colour">${n}</div>\n <div class="signature-widths" role="group" aria-label="Pen width">${o}</div>\n <div class="signature-actions">\n <button class="signature-btn" data-action="undo" aria-label="Undo" disabled>\n <span data-icon="undo" style="font-size:0.875rem;"></span>\n </button>\n <button class="signature-btn" data-action="redo" aria-label="Redo" disabled>\n <span data-icon="redo" style="font-size:0.875rem;"></span>\n </button>\n <button class="signature-btn signature-btn-clear" data-action="clear" aria-label="Clear signature">Clear</button>\n </div>\n ${s}\n </div>`:"",r=parseInt(e.height,10)||180,a=t(e.format.toUpperCase()),l=t(e.name),d=t(e.placeholder),c=`\n ${i}\n <div class="signature-canvas-wrapper" style="height:${r}px;">\n <canvas class="signature-canvas" tabindex="0" aria-label="Draw your signature here"></canvas>\n ${e.guideLine?'<div class="signature-guide-line" aria-hidden="true"></div>':""}\n <div class="signature-placeholder" aria-hidden="true">${d}</div>\n <input class="signature-type-input" type="text" placeholder="${d}" style="display:none;" aria-label="Type your signature">\n </div>\n <div class="signature-footer">\n <span class="signature-status" aria-live="polite">Draw your signature above</span>\n <span class="signature-format-badge">${a}</span>\n </div>\n <input type="hidden" name="${l}" value="">\n `;this.element.classList.add("signature"),this.element.setAttribute("role","application"),this.element.setAttribute("aria-label",t(e.label)),this.element.textContent="",this.element.insertAdjacentHTML("afterbegin",c),this._canvas=this.element.querySelector(".signature-canvas"),this._wrapper=this.element.querySelector(".signature-canvas-wrapper"),this._placeholder=this.element.querySelector(".signature-placeholder"),this._statusEl=this.element.querySelector(".signature-status"),this._hiddenInput=this.element.querySelector('input[type="hidden"]'),this._typeInput=this.element.querySelector(".signature-type-input"),"undefined"!=typeof Domma&&Domma.icons&&"function"==typeof Domma.icons.scan&&Domma.icons.scan(this.element)}_initCanvas(){this._canvas&&(this._ctx=this._canvas.getContext("2d"),this._scaleCanvas(),"undefined"!=typeof ResizeObserver&&(this._resizeObserver=new ResizeObserver(()=>{this._scaleCanvas(),this._redraw()}),this._resizeObserver.observe(this._wrapper)))}_scaleCanvas(){const e=window.devicePixelRatio||1,t=this._wrapper.clientWidth,n=this._wrapper.clientHeight;this._canvas.width=t*e,this._canvas.height=n*e,this._ctx.setTransform(e,0,0,e,0,0),this._dpr=e,this._canvasW=t,this._canvasH=n}_initEvents(){const e=this._canvas;e&&(this._addEventListener(e,"pointerdown",e=>this._onPointerDown(e)),this._addEventListener(e,"pointermove",e=>this._onPointerMove(e)),this._addEventListener(e,"pointerup",e=>this._onPointerUp(e)),this._addEventListener(e,"pointercancel",e=>this._onPointerUp(e)),this._addEventListener(e,"pointerleave",e=>{this._isDrawing&&this._onPointerUp(e)}),this._addEventListener(this.element,"click",e=>{const t=e.target.closest("[data-action]");if(t){const e=t.dataset.action;return void("undo"===e?this.undo():"redo"===e?this.redo():"clear"===e&&this.clear())}const n=e.target.closest(".signature-colour-swatch");if(n)return void this._setColour(n.dataset.colour);const o=e.target.closest(".signature-width-btn");if(o)return void this._setPenWidth(parseFloat(o.dataset.width));const s=e.target.closest(".signature-mode-btn");s&&this._setMode(s.dataset.mode)}),this._typeInput&&this._addEventListener(this._typeInput,"input",()=>this._renderTypeToCanvas()))}_onPointerDown(e){if(this.options.disabled||"draw"!==this._mode)return;e.preventDefault(),this._canvas.setPointerCapture(e.pointerId),this._isDrawing=!0,this.element.classList.add("signature-signing");const{x:t,y:n}=this._getPoint(e),o=e.pressure||.5;this._currentStroke={points:[{x:t,y:n,pressure:o}],colour:this._currentColour,width:this._currentWidth},this._undoneStrokes=[],this._updateState(),"function"==typeof this.options.onBegin&&this.options.onBegin(this._currentStroke)}_onPointerMove(e){if(!this._isDrawing||!this._currentStroke)return;e.preventDefault();const{x:t,y:n}=this._getPoint(e),o=e.pressure||.5;this._currentStroke.points.push({x:t,y:n,pressure:o}),this._redrawCurrentStroke()}_onPointerUp(e){if(!this._isDrawing)return;this._isDrawing=!1,this.element.classList.remove("signature-signing"),this._currentStroke&&this._currentStroke.points.length>=this.options.minStrokeLength&&this._strokes.push(this._currentStroke);const t=this._currentStroke;this._currentStroke=null,this._redraw(),this._updateState(),this._updateHiddenInput(),"function"==typeof this.options.onEnd&&t&&this.options.onEnd(t),"function"==typeof this.options.onChange&&this.options.onChange(this._hiddenInput.value)}_getPoint(e){const t=this._canvas.getBoundingClientRect();return{x:(e.clientX-t.left)/this._canvasW,y:(e.clientY-t.top)/this._canvasH}}_redraw(){if(!this._ctx)return;const e=this._canvasW,t=this._canvasH;this._ctx.clearRect(0,0,e,t);for(const n of this._strokes)this._drawStroke(this._ctx,n,e,t);this._placeholder&&(this._placeholder.style.display=this._strokes.length>0?"none":"")}_redrawCurrentStroke(){this._redraw(),this._currentStroke&&this._drawStroke(this._ctx,this._currentStroke,this._canvasW,this._canvasH)}_drawStroke(e,t,n,o){const s=t.points;if(0!==s.length){if(e.save(),e.strokeStyle=t.colour,e.fillStyle=t.colour,e.lineCap="round",e.lineJoin="round",1===s.length){const i=t.width*(.4+.6*s[0].pressure);e.beginPath(),e.arc(s[0].x*n,s[0].y*o,i/2,0,2*Math.PI),e.fill()}else{e.beginPath(),e.moveTo(s[0].x*n,s[0].y*o);for(let i=1;i<s.length-1;i++){const r=(s[i].x+s[i+1].x)/2*n,a=(s[i].y+s[i+1].y)/2*o;e.lineWidth=t.width*(.4+.6*s[i].pressure),e.quadraticCurveTo(s[i].x*n,s[i].y*o,r,a),e.stroke(),e.beginPath(),e.moveTo(r,a)}const i=s[s.length-1];e.lineWidth=t.width*(.4+.6*i.pressure),e.lineTo(i.x*n,i.y*o),e.stroke()}e.restore()}}_updateState(){const e=this.element.querySelector('[data-action="undo"]'),t=this.element.querySelector('[data-action="redo"]');e&&(e.disabled=0===this._strokes.length),t&&(t.disabled=0===this._undoneStrokes.length),this._statusEl&&(this._isDrawing?this._statusEl.textContent="Signing…":this._strokes.length>0?this._statusEl.textContent="Signature captured":this._statusEl.textContent="Draw your signature above")}_setColour(e){this._currentColour=e,this.element.querySelectorAll(".signature-colour-swatch").forEach(t=>{const n=t.dataset.colour===e;t.classList.toggle("active",n),t.setAttribute("aria-pressed",n?"true":"false")})}_setPenWidth(e){this._currentWidth=e,this.element.querySelectorAll(".signature-width-btn").forEach(t=>{const n=parseFloat(t.dataset.width)===e;t.classList.toggle("active",n),t.setAttribute("aria-pressed",n?"true":"false")})}_setMode(e){if(this._mode===e)return;this._mode=e,this.element.querySelectorAll(".signature-mode-btn").forEach(t=>{const n=t.dataset.mode===e;t.classList.toggle("active",n),t.setAttribute("aria-pressed",n?"true":"false")});this.element.querySelectorAll('.signature-colours, .signature-widths, [data-action="undo"], [data-action="redo"]').forEach(t=>{t.style.display="type"===e?"none":""}),"type"===e?(this._canvas.style.display="none",this._typeInput&&(this._typeInput.style.display="",this._typeInput.focus())):(this._canvas.style.display="",this._typeInput&&(this._typeInput.style.display="none")),this.clear(!0)}_renderTypeToCanvas(){const e=this._typeInput?this._typeInput.value.trim():"";this._strokes=[],this._undoneStrokes=[];const t=this._ctx,n=this._canvasW,o=this._canvasH;t.clearRect(0,0,n,o),e&&(t.save(),t.fillStyle=this._currentColour,t.font=`${Math.min(.55*o,72)}px 'Brush Script MT', 'Segoe Script', cursive`,t.textAlign="center",t.textBaseline="middle",t.fillText(e,n/2,o/2),t.restore()),this._updateHiddenInput(),"function"==typeof this.options.onChange&&this.options.onChange(this._hiddenInput.value)}_updateHiddenInput(){if(!this._hiddenInput)return;const e=this.isEmpty()&&"type"!==this._mode;this._hiddenInput.value=e?"":this.toBase64()}toBase64(e){return"svg"===(e||this.options.format)?this._toSVGBase64():this._canvas.toDataURL("image/png")}_toSVGBase64(){const e=this._canvasW,t=this._canvasH;let n="";for(const o of this._strokes){const s=o.points;if(0===s.length)continue;let i=`M ${(s[0].x*e).toFixed(2)} ${(s[0].y*t).toFixed(2)}`;for(let n=1;n<s.length-1;n++){const o=((s[n].x+s[n+1].x)/2*e).toFixed(2),r=((s[n].y+s[n+1].y)/2*t).toFixed(2);i+=` Q ${(s[n].x*e).toFixed(2)} ${(s[n].y*t).toFixed(2)} ${o} ${r}`}if(s.length>1){const n=s[s.length-1];i+=` L ${(n.x*e).toFixed(2)} ${(n.y*t).toFixed(2)}`}const r=s.reduce((e,t)=>e+t.pressure,0)/s.length,a=(o.width*(.4+.6*r)).toFixed(2);n+=`<path d="${i}" stroke="${o.colour}" stroke-width="${a}" fill="none" stroke-linecap="round" stroke-linejoin="round"/>\n`}return"data:image/svg+xml;base64,"+btoa(`<svg xmlns="http://www.w3.org/2000/svg" width="${e}" height="${t}" viewBox="0 0 ${e} ${t}">\n${n}</svg>`)}isEmpty(){return"type"===this._mode?!this._typeInput||""===this._typeInput.value.trim():0===this._strokes.length}clear(e=!1){!e&&this._strokes.length>0&&(this._undoneStrokes=[...this._strokes,...this._undoneStrokes]),this._strokes=[],this._currentStroke=null,this._redraw(),this._updateState(),this._hiddenInput&&(this._hiddenInput.value=""),e||(this._statusEl&&(this._statusEl.textContent="Signature cleared"),"function"==typeof this.options.onClear&&this.options.onClear(),"function"==typeof this.options.onChange&&this.options.onChange(""))}undo(){0!==this._strokes.length&&(this._undoneStrokes.unshift(this._strokes.pop()),this._redraw(),this._updateState(),this._updateHiddenInput(),"function"==typeof this.options.onChange&&this.options.onChange(this._hiddenInput.value))}redo(){0!==this._undoneStrokes.length&&(this._strokes.push(this._undoneStrokes.shift()),this._redraw(),this._updateState(),this._updateHiddenInput(),"function"==typeof this.options.onChange&&this.options.onChange(this._hiddenInput.value))}disable(){this.options.disabled=!0,this.element.classList.add("signature-disabled"),this._canvas&&this._canvas.setAttribute("aria-disabled","true"),this._typeInput&&(this._typeInput.disabled=!0),this.element.querySelectorAll("[data-action]").forEach(e=>{e.disabled=!0})}enable(){this.options.disabled=!1,this.element.classList.remove("signature-disabled"),this._canvas&&this._canvas.removeAttribute("aria-disabled"),this._typeInput&&(this._typeInput.disabled=!1),this._updateState();const e=this.element.querySelector('[data-action="clear"]');e&&(e.disabled=!1)}destroy(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null),super.destroy()}}const Y={_instances:new Map,card(e,t={}){const n=function(e,t={}){const n="string"==typeof e?document.querySelector(e):e;if(!n)return null;const o=document.createElement("domma-card");let s=null;for(const[e,n]of Object.entries(t))if("function"==typeof n){const t=e.replace(/^on/,"").toLowerCase();o.addEventListener(t,()=>{n(s||o)})}else"boolean"==typeof n?n&&o.setAttribute(M(e),""):null!=n&&o.setAttribute(M(e),String(n));if(t.title){const e=document.createElement("div");e.setAttribute("slot","header"),e.className="card-header";const n=document.createElement("h4");if(n.className="card-title",t.icon){const e=document.createElement("span");e.setAttribute("data-icon",t.icon),e.className="card-title-icon",n.appendChild(e)}n.appendChild(document.createTextNode(t.title)),e.appendChild(n),o.appendChild(e)}if(t.content){const e=document.createElement("div");e.setAttribute("slot","body"),e.className="card-body";const n="undefined"!=typeof Domma&&Domma.sanitize&&"function"==typeof Domma.sanitize.sanitize?Domma.sanitize.sanitize(t.content):t.content;e.innerHTML=n,o.appendChild(e)}return Array.from(n.children).forEach(e=>{e.classList.contains("card-header")?e.setAttribute("slot","header"):e.classList.contains("card-body")?e.setAttribute("slot","body"):e.classList.contains("card-footer")&&e.setAttribute("slot","footer"),o.appendChild(e)}),x(n,o,"card"),n.replaceWith(o),s={element:o,options:o._options,collapse(){return o.collapse(),this},expand(){return o.expand(),this},toggle(){return o.toggle(),this},isCollapsed:()=>o.isCollapsed(),setShadow(e){return o.setShadow(e),this},setHoverable(e){return o.setHoverable(e),this},setContent(e){return o.setContent(e),this},getBody:()=>o.getBody(),updateHeight(){return o.updateHeight(),this},destroy(){o.destroy()}},s}(e,t);return n&&n.element&&this._instances.set(n.element,n),n},modal(e,t={}){if("object"==typeof e&&!e.nodeType&&"string"!=typeof e)return E.createModal(e);const n=function(e,t={}){const n="string"==typeof e?document.querySelector(e):e;if(!n)return null;const o=document.createElement("domma-modal");for(const[e,n]of Object.entries(t))if("function"==typeof n){const t=e.replace(/^on/,"").toLowerCase();o.addEventListener(t,e=>{n(e.detail||o)})}else"boolean"==typeof n?n&&o.setAttribute(M(e),""):"buttons"===e&&Array.isArray(n)?(o._options=o._options||{},o._options.buttons=n):null!=n&&o.setAttribute(M(e),String(n));for(;n.firstChild;)o.appendChild(n.firstChild);return x(n,o,"modal"),n.replaceWith(o),{element:o,options:o._options,open(){return o.open(),this},close(){return o.close(),this},toggle(){return o.toggle(),this},isOpen:()=>o.isOpen(),setTitle(e){return o.setTitle(e),this},setContent(e){return o.setContent(e),this},setButtons(e){return o.setButtons(e),this},destroy(){o.destroy()},remove(){o.remove()}}}(e,t);return n&&n.element&&this._instances.set(n.element,n),n},tabs(e,t={}){const n=new S(e,t);return n.element&&this._instances.set(n.element,n),n},accordion(e,t={}){const n=new A(e,t);return n.element&&this._instances.set(n.element,n),n},tooltip(e,t={}){const n=function(e,t={}){const n="string"==typeof e?document.querySelectorAll(e):[e];if(0===n.length)return null;const o=[];return n.forEach(e=>{if(!e)return;const n=void 0===t.content||null===t.content||""===t.content?{...t,content:e.dataset.tooltip||e.title||""}:t,s=e=>{for(const[t,o]of Object.entries(n))if("function"==typeof o){const n=t.replace(/^on/,"").toLowerCase();e.addEventListener(n,()=>o(e))}else"delay"===t&&"object"==typeof o?(void 0!==o.show&&e.setAttribute("delay",String(o.show)),void 0!==o.hide&&e.setAttribute("hide-delay",String(o.hide))):"boolean"==typeof o?o&&e.setAttribute(M(t),""):null!=o&&e.setAttribute(M(t),String(o))};let i;e.parentNode&&"DOMMA-TOOLTIP"===e.parentNode.tagName?(i=e.parentNode,s(i)):(i=document.createElement("domma-tooltip"),s(i),e.parentNode.insertBefore(i,e),i.appendChild(e),i._dommaComponent=i),o.push({element:i,options:i._options,show(){return i.show(),this},hide(){return i.hide(),this},toggle(){return i.toggle(),this},setContent(e){return i.setContent(e),this},setPosition(e){return i.setPosition(e),this},isVisible:()=>i.isVisible(),destroy(){const e=i.querySelector("*");e&&i.parentNode&&i.parentNode.insertBefore(e,i),i.remove()}})}),1===o.length?o[0]:o}(e,t);return Array.isArray(n)?n.forEach(e=>{e.element&&this._instances.set(e.element,e)}):n&&n.element&&this._instances.set(n.element,n),n},badge(e,t={}){const n=function(e,t={}){const n="string"==typeof e?document.querySelector(e):e;if(!n)return null;const o=n.textContent,s=document.createElement("domma-badge");s.textContent=o;for(const[e,n]of Object.entries(t))if("function"==typeof n){const t=e.replace(/^on/,"").toLowerCase();s.addEventListener(t,e=>{n(e.detail.event||e,s)})}else"boolean"==typeof n?n&&s.setAttribute(M(e),""):null!=n&&s.setAttribute(M(e),String(n));return x(n,s,"badge"),n.replaceWith(s),s._dommaComponent=s,{element:s,options:s._options,setOptions(e){return s.setOptions(e),this},setVariant(e){return s.setVariant(e),this},setSize(e){return s.setSize(e),this},setText(e){return s.setText(e),this},remove(){s.remove()},destroy(){s.destroy()}}}(e,t);return n&&n.element&&this._instances.set(n.element,n),n},numberBadge(e,t={}){const n=function(e,t={}){const n="string"==typeof e?document.querySelector(e):e;if(!n)return null;const o=document.createElement("domma-number-badge");return void 0!==t.count&&o.setAttribute("count",String(t.count)),t.variant&&o.setAttribute("variant",t.variant),t.dot&&o.setAttribute("dot",""),t.pulse&&o.setAttribute("pulse",""),t.borderColor&&o.setAttribute("border-color",t.borderColor),n.parentNode.insertBefore(o,n),o.appendChild(n),o._dommaComponent=o,{element:o,options:o._options,setOptions(e){return o.setOptions(e),this},setCount(e){return o.setCount(e),this},increment(e=1){return o.increment(e),this},decrement(e=1){return o.decrement(e),this},setDot(e){return o.setDot(e),this},setVariant(e){return o.setVariant(e),this},setPulse(e){return o.setPulse(e),this},getCount:()=>o.getCount(),remove(){o.parentNode&&n.parentNode===o&&o.parentNode.insertBefore(n,o),o.remove()},destroy(){o.destroy()}}}(e,t);return n&&n.element&&this._instances.set(n.element,n),n},dropdown(e,t={}){const n=new z(e,t);return n.element&&this._instances.set(n.element,n),n},carousel(e,t={}){const n=new W(e,t);return n.element&&this._instances.set(n.element,n),n},cookieConsent(e={}){if(this._instances.has("cookieConsent"))return this._instances.get("cookieConsent");const t=new H(e);return this._instances.set("cookieConsent",t),t},backToTop(e,t={}){const n=function(e,t={}){const n=document.createElement("domma-back-to-top");for(const[e,o]of Object.entries(t))if("function"==typeof o){const t=e.replace(/^on/,"").toLowerCase();n.addEventListener(t,e=>{o(e.detail||n)})}else"boolean"==typeof o?o&&n.setAttribute(M(e),""):null!=o&&n.setAttribute(M(e),String(o));return document.body.appendChild(n),n._dommaComponent=n,{element:n,options:n._options,scroll(){return n.scroll(),this},show(){return n.show(),this},hide(){return n.hide(),this},toggle(){return n.toggle(),this},isVisible:()=>n.isVisible(),getButton:()=>n.getButton(),setShowAfter(e){return n.setShowAfter(e),this},setPosition(e){return n.setPosition(e),this},setOffset(e){return n.setOffset(e),this},destroy(){n.destroy()}}}(0,t);return n&&n.element&&this._instances.set("backToTop",n),n},buttonGroup(e,t={}){const n="string"==typeof e?document.querySelectorAll(e):[e],o=[];for(const e of n){const n=new D(e,t);this._instances.set(e,n),o.push(n)}return 1===o.length?o[0]:o},loader(e,t={}){const n=L(e,t);return n&&n.element&&this._instances.set(n.element,n),n},showLoader(e,t={}){const n="string"==typeof e?document.querySelector(e):e;if(!n)return null;let o=this._instances.get(n);return o?o.show():(o=L(n,{...t,visible:!0}),this._instances.set(n,o)),o},hideLoader(e){const t="string"==typeof e?document.querySelector(e):e,n=this._instances.get(t);n&&n.hide&&n.hide()},fullscreenLoader(e="Loading...",t={}){let n=document.getElementById("dm-loader-fullscreen");n||(n=document.createElement("div"),n.id="dm-loader-fullscreen",n.style.cssText="\n position: fixed;\n inset: 0;\n background: rgba(0, 0, 0, 0.7);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 9999;\n ",document.body.appendChild(n));const o=L(n,{type:t.type||"spinner",size:t.size||"large",color:t.color||"white",text:e,overlay:!1,centered:!1,visible:!0});return n.style.display="flex",this._instances.set(n,o),o},breadcrumbs(e,t={}){const n=new O(e,t);return n.element&&this._instances.set(n.element,n),n},navbar(e,t={}){const n=new N(e,t);return n.element&&this._instances.set(n.element,n),n},sidebar(e,t={}){const n=new V(e,t);return n.element&&this._instances.set(n.element,n),n},footer(e,t={}){const n=new P(e,t);return n.element&&this._instances.set(n.element,n),n},notification:(e={})=>new j(e),notify:(e,t={})=>j.notify(e,t),timer(e,t={}){const n=new B(e,t);return n.element&&this._instances.set(n.element,n),n},alarm:(e={})=>new T(e),autocomplete(e,t={}){const n=new R(e,t);return n.element&&this._instances.set(n.element,n),n},pillbox(e,t={}){const n=new F(e,t);return n.element&&this._instances.set(n.element,n),n},chooser(e,t={}){const n="string"==typeof e?document.querySelector(e):e;if(!n)return console.warn("[Domma.elements.chooser] host not found:",e),null;const o={variant:"card",multiple:!1,density:"comfortable",columns:3,glow:!1,glowColour:null,shadow:"none",shadowColour:null,accent:"primary",accentStyle:"border",options:[],...t};let s=void 0!==o.value?o.value:o.multiple?[]:null;const i=document.createElement("div");i.className="domma-chooser",i.setAttribute("data-variant",o.variant),i.setAttribute("data-density",o.density),i.style.setProperty("--picker-cols",String(o.columns)),i.style.setProperty("--picker-cols-md",String(Math.min(o.columns,2))),i.style.setProperty("--picker-cols-sm","1");const r={primary:1,success:1,info:1,warning:1,danger:1},a=e=>"string"==typeof e&&r[e];if(o.glow&&i.setAttribute("data-glow","true"),o.glowColour&&(a(o.glowColour)?i.setAttribute("data-glow-colour",o.glowColour):i.style.setProperty("--picker-glow-colour",o.glowColour)),o.shadow&&"none"!==o.shadow&&i.setAttribute("data-shadow",o.shadow),o.shadowColour&&i.style.setProperty("--picker-shadow-colour",o.shadowColour),o.accent&&(a(o.accent)?i.setAttribute("data-accent",o.accent):i.style.setProperty("--picker-accent",o.accent)),o.accentStyle&&"border"!==o.accentStyle&&i.setAttribute("data-accent-style",o.accentStyle),o.label){const e=document.createElement("label");if(e.className="picker-label",e.textContent=o.label,o.required){const t=document.createElement("span");t.className="picker-required",t.textContent="*",e.appendChild(t)}i.appendChild(e)}const l=document.createElement("div");l.className="picker-options",l.setAttribute("role",o.multiple?"group":"radiogroup"),i.appendChild(l);const d=e=>{const t=String(e);return o.multiple?Array.isArray(s)&&s.map(String).includes(t):null!=s&&String(s)===t},c=()=>{l.replaceChildren(),o.options.forEach((e,t)=>l.appendChild(((e,t)=>{const n=document.createElement("div");if(n.className="picker-option",n.setAttribute("role",o.multiple?"checkbox":"radio"),n.setAttribute("tabindex",o.multiple||0===t?"0":"-1"),n.setAttribute("data-value",String(e.value)),n.setAttribute("aria-checked",d(e.value)?"true":"false"),d(e.value)&&n.classList.add("is-selected"),e.disabled&&(n.classList.add("is-disabled"),n.setAttribute("aria-disabled","true")),e.recommended&&n.classList.add("is-recommended"),e.icon){const t=document.createElement("span");t.className="picker-option-icon",t.setAttribute("data-icon",e.icon),n.appendChild(t)}const s=document.createElement("span");if(s.className="picker-option-label",s.textContent=e.label,n.appendChild(s),e.description&&"compact"!==o.density&&"card"===o.variant){const t=document.createElement("span");t.className="picker-option-desc",t.textContent=e.description,n.appendChild(t)}if("card"===o.variant){const e=document.createElement("span");e.className="picker-option-tick",e.setAttribute("aria-hidden","true");const t=document.createElement("span");t.setAttribute("data-icon","check"),t.setAttribute("data-icon-size","12"),e.appendChild(t),n.appendChild(e)}if(e.badge&&e.badge.text){const t=document.createElement("span");t.className="picker-option-badge";const o=document.createElement("span");o.className="badge badge-"+(e.badge.type||"primary"),o.textContent=e.badge.text,t.appendChild(o),n.appendChild(t)}if(e.tooltip&&n.setAttribute("data-tooltip",e.tooltip),o.name){const t=document.createElement("input");t.className="picker-native-input",t.type=o.multiple?"checkbox":"radio",t.name=o.multiple?o.name+"[]":o.name,t.value=String(e.value),t.checked=d(e.value),t.disabled=!!e.disabled,t.tabIndex=-1,n.appendChild(t)}return n})(e,t))),"undefined"!=typeof Domma&&Domma.icons&&"function"==typeof Domma.icons.scan&&Domma.icons.scan(l)},h=(e,t=!0)=>{s=e,c(),t&&"function"==typeof o.onChange&&o.onChange(s)};return l.addEventListener("click",e=>{const t=e.target.closest(".picker-option");if(!t||t.classList.contains("is-disabled"))return;const n=t.getAttribute("data-value");if(o.multiple){const e=Array.isArray(s)?s.slice():[],t=e.indexOf(n);t>=0?e.splice(t,1):e.push(n),h(e)}else h(n)}),l.addEventListener("keydown",e=>{const t=e.target.closest(".picker-option");if(!t)return;const n=Array.from(l.querySelectorAll(".picker-option")).filter(e=>!e.classList.contains("is-disabled")),i=n.indexOf(t);if(o.multiple){if(" "===e.key||"Spacebar"===e.key){if(e.preventDefault(),t.classList.contains("is-disabled"))return;const n=t.getAttribute("data-value"),o=Array.isArray(s)?s.slice():[],i=o.indexOf(n);i>=0?o.splice(i,1):o.push(n),h(o)}return}if("Enter"===e.key||" "===e.key){if(e.preventDefault(),t.classList.contains("is-disabled"))return;return void h(t.getAttribute("data-value"))}let r=null;if("ArrowRight"===e.key||"ArrowDown"===e.key)r=i+1;else{if("ArrowLeft"!==e.key&&"ArrowUp"!==e.key)return;r=i-1}e.preventDefault(),r<0&&(r=n.length-1),r>=n.length&&(r=0);const a=n[r];if(a){const e=a.getAttribute("data-value");h(e);const t=l.querySelector('.picker-option[data-value="'+e.replace(/"/g,'\\"')+'"]');t&&"function"==typeof t.focus&&t.focus()}}),n.appendChild(i),c(),{_root:i,getValue:()=>s,setValue(e){h(e,!1)},disable(){i.querySelectorAll(".picker-option").forEach(e=>e.classList.add("is-disabled"))},enable(){i.querySelectorAll(".picker-option").forEach(e=>e.classList.remove("is-disabled"))},destroy(){i.remove()}}},treeView(e,t={}){const n=new u(e,t);return n.element&&this._instances.set(n.element,n),n},slideover(e,t={}){if("object"==typeof e&&!e.nodeType&&"string"!=typeof e)return e.schema,q.create(e);const n=new q(e,t);return n.element&&this._instances.set(n.element,n),n},progression(e,t={}){const n=new U(e,t);return n.element&&this._instances.set(n.element,n),n},listGroup(e,t={}){const n="string"==typeof e?document.querySelectorAll(e):[e],o=[];for(const e of n){const n=new $(e,t);n.element&&this._instances.set(e,n),o.push(n)}return 1===o.length?o[0]:o},timeline(e,t={}){return"undefined"!=typeof Domma&&!1!==Domma.config?.deprecationWarnings&&"undefined"!=typeof console&&console.warn('Domma: timeline() is deprecated. Use progression({ mode: "timeline" }) instead.'),this.progression(e,{mode:"timeline",...t})},toast:Object.assign((e,t={})=>C.show(e,t),{show:C.show.bind(C),success:C.success.bind(C),error:C.error.bind(C),warning:C.warning.bind(C),info:C.info.bind(C),closeAll:C.closeAll.bind(C)}),dialog:I,alert:I.alert.bind(I),confirm:I.confirm.bind(I),prompt:I.prompt.bind(I),createModal:E.createModal.bind(E),showModal:E.showModal.bind(E),signature(e,t={}){const n=new K(e,t);return n.element&&this._instances.set(n.element,n),n},get(e){const t="string"==typeof e?document.querySelector(e):e;return this._instances.get(t)},destroy(e){const t="string"==typeof e?document.querySelector(e):e,n=this._instances.get(t);n&&(n.destroy(),this._instances.delete(t))},destroyAll(){for(const e of this._instances.values())e.destroy();this._instances.clear()},_registry:new Map,register(e,t){this._registry.set(e,t)},create(e,t,n={}){const o=this._registry.get(e);if(o)return new o(t,n);throw new Error(`Unknown component: ${e}`)}},J={_prefix:"domma:",_available:null,isAvailable(){if(null!==this._available)return this._available;try{const e=`${this._prefix}__test__`;localStorage.setItem(e,"test"),localStorage.removeItem(e),this._available=!0}catch(e){this._available=!1}return this._available},_prefixKey(e){return`${this._prefix}${e}`},_unprefixKey(e){return e.slice(this._prefix.length)},get(e,t=null){if(!this.isAvailable())return t;try{const n=this._prefixKey(e),o=localStorage.getItem(n);return null===o?t:JSON.parse(o)}catch(n){return console.warn(`Domma storage: Failed to parse key "${e}"`,n),t}},set(e,t){if(!this.isAvailable())return!1;try{const n=this._prefixKey(e),o=JSON.stringify(t);return localStorage.setItem(n,o),!0}catch(t){return console.warn(`Domma storage: Failed to set key "${e}"`,t),!1}},remove(e){if(!this.isAvailable())return!1;try{const t=this._prefixKey(e);return localStorage.removeItem(t),!0}catch(t){return console.warn(`Domma storage: Failed to remove key "${e}"`,t),!1}},has(e){if(!this.isAvailable())return!1;try{const t=this._prefixKey(e);return null!==localStorage.getItem(t)}catch(e){return!1}},clear(){if(!this.isAvailable())return 0;try{const e=this.keys();return e.forEach(e=>this.remove(e)),e.length}catch(e){return console.warn("Domma storage: Failed to clear storage",e),0}},keys(){if(!this.isAvailable())return[];try{const e=[];for(let t=0;t<localStorage.length;t++){const n=localStorage.key(t);n&&n.startsWith(this._prefix)&&e.push(this._unprefixKey(n))}return e}catch(e){return[]}},size(e){if(!this.isAvailable())return 0;try{const t=this._prefixKey(e),n=localStorage.getItem(t);return n?new Blob([n]).size:0}catch(e){return 0}},totalSize(){if(!this.isAvailable())return 0;try{let e=0;return this.keys().forEach(t=>{e+=this.size(t)}),e}catch(e){return 0}},getAll(){if(!this.isAvailable())return{};const e={};return this.keys().forEach(t=>{e[t]=this.get(t)}),e},setAll(e){if(!this.isAvailable()||!e)return!1;let t=!0;return Object.keys(e).forEach(n=>{this.set(n,e[n])||(t=!1)}),t}};function G(e,{fallback:t,onWrite:n}={}){const o=t&&"object"==typeof t?Object.keys(t):[];return 0===o.length&&"function"!=typeof n?e:new Proxy({},{get:(n,o)=>"string"==typeof o&&!(o in e)&&o in t?t[o]:e[o],has:(n,s)=>s in e||"string"==typeof s&&o.length>0&&s in t,ownKeys:()=>[...new Set([...o,...Reflect.ownKeys(e)])],getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),set:(t,o,s)=>(e[o]=s,"string"==typeof o&&"function"==typeof n&&n(o,s),!0)})}
9
- /*! domma-reactive v1.0.0 | MIT | https://github.com/pinpointzero73/domma-reactive */function X(e,t){return Q(e,t,null)}function Z(e){return e===Object.prototype||null===e}function Q(e,t,n){if(Object.is(e,t))return!0;if(0===e&&0===t)return!0;if(null===e||null===t)return!1;if("object"!=typeof e||"object"!=typeof t)return!1;if(e instanceof Date||t instanceof Date)return e instanceof Date&&t instanceof Date&&Object.is(e.getTime(),t.getTime());const o=Array.isArray(e);if(o!==Array.isArray(t))return!1;if(!(o||Z(Object.getPrototypeOf(e))&&Z(Object.getPrototypeOf(t))))return!1;const s=n||new WeakMap,i=s.get(e);if(i){if(i.has(t))return!0;i.add(t)}else s.set(e,new Set([t]));if(o){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Q(e[n],t[n],s))return!1;return!0}const r=Object.keys(e),a=Object.keys(t);if(r.length!==a.length)return!1;for(const n of r){if(!Object.prototype.hasOwnProperty.call(t,n))return!1;if(!Q(e[n],t[n],s))return!1}return!0}let ee=null;const te=[],ne=new Set;let oe=!1,se=!1;class ie{constructor(e=null){this.subs=new Set,this.owner=e}track(){ee&&ee!==this.owner&&(this.subs.add(ee),ee.deps.add(this))}trigger(){if(0!==this.subs.size){for(const e of this.subs)e.invalidate(),ne.add(e);ae()}}}class re{constructor(e,t={}){this.fn=e,this.label=t.label||(t.effect?"effect":"computed"),this.isEffect=!0===t.effect,this.onNotify=t.onNotify||null,this._write="function"==typeof t.write?t.write:null,this.deps=new Set,this.dep=new ie(this),this._value=void 0,this.dirty=!0,this.disposed=!1}_run(){for(const e of this.deps)e.subs.delete(this);this.deps.clear(),te.push(ee),ee=this;try{return this.fn()}catch(e){return void console.warn(`[Domma Reactive] "${this.label}" threw during evaluation:`,e)}finally{ee=te.pop()}}get(){return this.dirty&&!this.disposed&&(this._value=this._run(),this.dirty=!1),this.dep.track(),this._value}get value(){return this.get()}set value(e){this.write(e)}write(e){this._write?he(()=>this._write(e)):console.warn(`[Domma Reactive] "${this.label}" is a read-only computed - the assignment was ignored. Pass computed({read, write}) to say where a write should land.`)}set(e){this.write(e)}recompute(){if(this.disposed)return{changed:!1,value:this._value};const e=this._value;return this._value=this._run(),this.dirty=!1,{changed:!X(e,this._value),value:this._value}}invalidate(){this.dirty=!0}dependents(){return this.dep.subs}notify(){!this.disposed&&this.onNotify&&this.onNotify(this._value,this)}dispose(){if(!this.disposed){for(const e of this.deps)e.subs.delete(this);this.deps.clear(),this.dep.subs.clear(),ne.delete(this),this.disposed=!0}}}function ae(){oe||se||(oe=!0,Promise.resolve().then(le))}function le(){if(oe=!1,!se&&0!==ne.size){se=!0;try{const e=new Set(ne);ne.clear(),function(e){const t=20,n=new Map,o=new Set,s=[...e];for(;s.length>0;){const e=s.shift();if(e.disposed)continue;const i=(n.get(e)||0)+1;if(n.set(e,i),i>t){console.warn(`[Domma Reactive] "${e.label}" re-entered the flush ${t} times - likely a dependency cycle. Skipping.`);continue}if(e.isEffect){o.add(e);continue}if(0===e.dependents().size&&!e.onNotify)continue;const{changed:r}=e.recompute();if(r)for(const t of e.dependents())t.invalidate(),s.push(t)}for(const e of o)e.disposed||e.recompute()}(e)}finally{se=!1,ne.size>0&&ae()}}}function de(e,t={}){if(null!==e&&"object"==typeof e){const{read:n,...o}=e;if("function"!=typeof n)throw new TypeError("[Domma Reactive] computed({read, write}): `read` must be a function");return new re(n,{...o,...t,effect:!1})}return new re(e,{...t,effect:!1})}function ce(e,t={}){const n=new re(e,{...t,effect:!0,onNotify:null});return n.recompute(),n}function he(e){te.push(ee),ee=null;try{return e()}finally{ee=te.pop()}}const ue="[Domma Reactive]",pe=new Map,me=new Set(["notify","rateLimit","throttle"]);function fe(e,t){if("string"!=typeof e||0===e.length)throw new TypeError(`${ue} registerExtender: the name must be a non-empty string`);if("function"!=typeof t)throw new TypeError(`${ue} registerExtender: "${e}" was not given a function`);return pe.has(e)&&!me.has(e)&&console.warn(`${ue} registerExtender: "${e}" replaces an existing extender`),pe.set(e,t),t}fe("notify",(e,t)=>{"always"===t?e.setEquals(()=>!1):console.warn(`${ue} extend: notify accepts only 'always' - got ${JSON.stringify(t)}`)});const ge=new WeakMap;fe("rateLimit",(e,t)=>{const n=function(e){const t=e&&"object"==typeof e?e:{timeout:e},n=t.timeout;if("number"!=typeof n||!Number.isFinite(n)||n<0)return console.warn(`${ue} extend: rateLimit needs a timeout in milliseconds - got ${JSON.stringify(n)}`),null;const o=t.method||"notifyWhenChangesStop";return"notifyWhenChangesStop"!==o&&"notifyAtFixedRate"!==o?(console.warn(`${ue} extend: rateLimit method must be 'notifyWhenChangesStop' or 'notifyAtFixedRate' - got ${JSON.stringify(o)}`),null):{timeout:n,fixed:"notifyAtFixedRate"===o}}(t);if(!n)return;let o=ge.get(e.observable);o||(o={timeout:n.timeout,fixed:n.fixed,timer:null,latest:void 0,armed:!1},ge.set(e.observable,o),e.intercept(e=>t=>function(e,t,n){e.timeout<=0?t(n):(e.latest=n,e.fixed&&e.armed||(e.armed=!0,e.timer&&clearTimeout(e.timer),e.timer=setTimeout(()=>{e.timer=null,e.armed=!1,t(e.latest)},e.timeout)))}(o,e,t))),o.timeout=n.timeout,o.fixed=n.fixed,0===n.timeout&&o.timer&&(clearTimeout(o.timer),o.timer=null,o.armed=!1)}),fe("throttle",(e,t)=>{pe.get("rateLimit")(e,t)});const ve="[Domma Reactive]";function ye(){const e=new Set;return{add(t){if("function"!=typeof t)throw new TypeError(`${ve} subscribe: expected a function`);e.add(t);const n=()=>{e.delete(t)};return n.dispose=n,n},notify(t){if(0!==e.size)for(const n of[...e])try{n(t)}catch(e){console.warn(`${ve} a subscriber threw:`,e)}},size:()=>e.size}}function be(e,t){let n=e.equals||X,o=t;const s={observable:null,setEquals(e){if("function"!=typeof e)throw new TypeError(`${ve} extend: setEquals expects a function`);n=e},intercept(e){if("function"!=typeof e)throw new TypeError(`${ve} extend: intercept expects a function`);o=e(o)}};return{changed:(e,t)=>!n(e,t),announce:e=>o(e),attach:e=>{s.observable=e},extend:e=>function(e,t){if(t&&"object"==typeof t)for(const[n,o]of Object.entries(t)){const t=pe.get(n);t?t(e,o):console.warn(`${ue} extend: no extender named "${n}". Registered: ${[...pe.keys()].join(", ")}.`)}else console.warn(`${ue} extend: expected an object of extenders`)}(s,e)}}function ke(e,t={}){const n=new ie,o=ye();let s=e;const i=be(t,e=>{n.trigger(),o.notify(e)}),r=e=>{const t=i.changed(s,e);s=e,t&&i.announce(s)},a={get value(){return n.track(),s},set value(e){r(e)},peek:()=>s,set:e=>r(e),subscribe:e=>o.add(e),extend:e=>(i.extend(e),a)};return i.attach(a),a}const _e=["push","pop","shift","unshift","splice","sort","reverse","fill","copyWithin"];const we=new Set(["$data","$root","$parent","$index","$length","$parents","$parentContext","$component"]),Me=Object.freeze([]);function xe(e){let t=null;return Object.defineProperty(e,"$parents",{enumerable:!0,get:()=>t??=function(e){const t=[];for(let n=e.$parentContext;null!==n;n=n.$parentContext)t.push(n.$data);return Object.freeze(t)}(e)}),Object.freeze(e)}function Le(e,t,n=null,o=null){const s=Ee(e);return xe({$data:t,$root:s.$root,$parent:s.$data,$index:void 0===n?null:n,$length:void 0===o?null:o,$parentContext:s,$component:s.$component??null})}function Ce(e,t){const n=Ee(e);return xe({$data:t,$root:n.$root,$parent:n.$data,$index:null,$length:null,$parentContext:n,$component:t})}function Ee(e){return function(e){return null!==e&&"object"==typeof e&&"$data"in e}(e)?e:(t=e,Object.freeze({$data:t,$root:t,$parent:null,$index:null,$length:null,$parents:Me,$parentContext:null,$component:null}));var t}const Se="[Domma Reactive]",Ae=64,$e=new Set(["__proto__","constructor","prototype"]),ze=new Map([["new","the `new` operator is not supported"],["delete","`delete` is not supported"],["typeof","`typeof` is not supported"],["void","`void` is not supported"],["instanceof","`instanceof` is not supported"],["in","the `in` operator is not supported"],["function","function expressions are not supported"],["class","class expressions are not supported"],["this","`this` is not supported - use $data"],["await","`await` is not supported"],["yield","`yield` is not supported"]]);class je extends Error{}const Be=new Map,Te=new Map,We=new Map,He=new WeakMap,Ie=new Set,De=/[0-9]/,Oe=/[\p{ID_Start}$_]/u,Ne=/[\p{ID_Continue}$\u200C\u200D]/u,Ve=["===","!==","&&","||","<=",">=","??","==","!=","<",">","+","-","*","/","%","!","?",":",".",",","(",")","[","]","="],Pe=new Map([["==","loose equality is not supported - use ==="],["!=","loose inequality is not supported - use !=="],["=","assignment is not supported"],["??","the ?? operator is not supported"]]),Re={n:"\n",t:"\t",r:"\r",b:"\b",f:"\f",v:"\v",0:"\0"};function Fe(e,t){const n=e[t];let o="",s=t+1;for(;s<e.length;){const t=e[s];if("\\"===t){const t=e[s+1];if(void 0===t)break;if("u"===t){const t=e.slice(s+2,s+6);if(!/^[0-9a-fA-F]{4}$/.test(t))throw new je(`bad \\u escape at position ${s}`);o+=String.fromCharCode(parseInt(t,16)),s+=6;continue}o+=Object.prototype.hasOwnProperty.call(Re,t)?Re[t]:t,s+=2;continue}if(t===n)return{value:o,end:s+1};o+=t,s++}throw new je(`unterminated string starting at position ${t}`)}const qe={"||":{bp:3,logical:!0},"&&":{bp:4,logical:!0},"===":{bp:5},"!==":{bp:5},"<":{bp:6},"<=":{bp:6},">":{bp:6},">=":{bp:6},"+":{bp:7},"-":{bp:7},"*":{bp:8},"/":{bp:8},"%":{bp:8}},Ue=new Set(["-","+","!"]),Ke=e=>Object.freeze(e);function Ye(e,t=!1){const n=function(e){const t=[];let n=0;for(;n<e.length;){const o=e[n];if(/\s/.test(o)){n++;continue}if(De.test(o)){const o=n;for(;n<e.length&&De.test(e[n]);)n++;if("."===e[n])for(n++;n<e.length&&De.test(e[n]);)n++;if("e"===e[n]||"E"===e[n]){const t=n;if(n++,"+"!==e[n]&&"-"!==e[n]||n++,De.test(e[n]??""))for(;n<e.length&&De.test(e[n]);)n++;else n=t}t.push({type:"num",value:Number(e.slice(o,n)),pos:o});continue}if('"'===o||"'"===o){const o=Fe(e,n);t.push({type:"str",value:o.value,pos:n}),n=o.end;continue}if("`"===o)throw new je(`template literals are not supported at position ${n}`);if(Oe.test(o)){const o=n;for(n++;n<e.length&&Ne.test(e[n]);)n++;const s=e.slice(o,n);"true"===s?t.push({type:"num",value:!0,pos:o}):"false"===s?t.push({type:"num",value:!1,pos:o}):"null"===s?t.push({type:"num",value:null,pos:o}):t.push({type:"ident",value:s,pos:o});continue}const s=Ve.find(t=>e.startsWith(t,n));if(s){const e=Pe.get(s);if(e)throw new je(`${e} (at position ${n})`);t.push({type:"punct",value:s,pos:n}),n+=s.length;continue}throw new je(`unexpected character "${o}" at position ${n}`)}return t.push({type:"eof",value:null,pos:e.length}),t}(e);let o=0,s=0;const i=()=>n[o],r=e=>"punct"===n[o].type&&n[o].value===e,a=(e,t=n[o])=>{throw new je(`${e} at position ${t.pos}`)},l=e=>!!r(e)&&(o++,!0),d=e=>{l(e)||a(`expected "${e}" but found ${Je(i())}`)};function c(e){if(++s>Ae)throw new je("expression nests deeper than 64 levels");try{let t=function(){const e=i();if("num"===e.type||"str"===e.type)return o++,Ke({type:"Literal",value:e.value});if("ident"===e.type){const t=ze.get(e.value);return t&&a(t),o++,Ke({type:"Identifier",name:e.value})}if("punct"===e.type){if(Ue.has(e.value))return o++,Ke({type:"Unary",operator:e.value,argument:c(9)});if("("===e.value){o++;const e=c(0);return d(")"),e}"["===e.value&&a("array literals are not supported")}return a(`unexpected ${Je(e)}`)}();for(;;){const n=i();if("punct"!==n.type)break;if(10>e&&("."===n.value||"["===n.value||"("===n.value)){t=h(t);continue}if("?"===n.value&&2>e){o++;const e=c(0);d(":");const n=c(1);t=Ke({type:"Conditional",test:t,consequent:e,alternate:n});continue}const s=Object.prototype.hasOwnProperty.call(qe,n.value)?qe[n.value]:void 0;if(!s||s.bp<=e)break;o++;const r=c(s.bp);t=Ke({type:s.logical?"Logical":"Binary",operator:n.value,left:t,right:r})}return t}finally{s--}}function h(e){if(l(".")){const t=i();return"ident"!==t.type&&a(`expected a property name after "." but found ${Je(t)}`),o++,Ke({type:"Member",object:e,property:t.value,computed:!1})}if(l("[")){const t=c(0);return d("]"),Ke({type:"Member",object:e,property:t,computed:!0})}d("(");const n=t&&"Member"===e.type;"Identifier"===e.type||n||a("only registered helpers can be called - `x.foo()` is not supported");const s=[];if(!r(")"))do{s.push(c(0))}while(l(","));return d(")"),Ke(n?{type:"MethodCall",object:e.object,property:e.property,computed:e.computed,args:Object.freeze(s)}:{type:"Call",callee:e.name,args:Object.freeze(s)})}if(1===n.length)throw new je("the expression is empty");const u=c(0);"eof"!==i().type&&a(`unexpected ${Je(i())}`);const p=function(e){let t=0;const n=[[e,1]];for(;n.length>0;){const[e,o]=n.pop();if(o>t&&(t=o),t>Ae)return t;for(const t of Ge(e))n.push([t,o+1])}return t}(u);if(p>Ae)throw new je(`expression nests deeper than 64 levels (${p})`);return u}function Je(e){return"eof"===e.type?"end of expression":"str"===e.type?`string ${JSON.stringify(e.value)}`:"num"===e.type?`literal ${String(e.value)}`:`"${e.value}"`}function Ge(e){switch(e?.type){case"Member":return e.computed?[e.object,e.property]:[e.object];case"Unary":return[e.argument];case"Binary":case"Logical":return[e.left,e.right];case"Conditional":return[e.test,e.consequent,e.alternate];case"Call":return e.args;case"MethodCall":return e.computed?[e.object,e.property,...e.args]:[e.object,...e.args];default:return[]}}function Xe(e,t){if(null==e)return;const n=String(t);if(!$e.has(n))return e[n];console.warn(`${Se} blocked an expression from reading "${n}" - __proto__, constructor and prototype are not readable from an expression`)}function Ze(e,t,n){if(n>Ae)throw new je("evaluation nests deeper than 64 levels");switch(e.type){case"Literal":return e.value;case"Identifier":return function(e,t){return we.has(e)?t[e]:Xe(t.$data,e)}(e.name,t);case"Member":return Xe(Ze(e.object,t,n+1),e.computed?Ze(e.property,t,n+1):e.property);case"Unary":{const o=Ze(e.argument,t,n+1);switch(e.operator){case"!":return!o;case"-":return-o;default:return+o}}case"Logical":{const o=Ze(e.left,t,n+1);return"&&"===e.operator?o?Ze(e.right,t,n+1):o:o||Ze(e.right,t,n+1)}case"Binary":{const o=Ze(e.left,t,n+1),s=Ze(e.right,t,n+1);switch(e.operator){case"+":return o+s;case"-":return o-s;case"*":return o*s;case"/":return o/s;case"%":return o%s;case"===":return o===s;case"!==":return o!==s;case"<":return o<s;case"<=":return o<=s;case">":return o>s;default:return o>=s}}case"Conditional":return Ze(e.test,t,n+1)?Ze(e.consequent,t,n+1):Ze(e.alternate,t,n+1);case"Call":return function(e,t){const n=Be.get(e);if("function"==typeof n)return n(...t);Ie.has(e)||(Ie.add(e),console.warn(`${Se} no helper named "${e}" is registered - expressions can only call helpers registered with registerHelper()`))}(e.callee,e.args.map(e=>Ze(e,t,n+1)));case"MethodCall":throw new je("an expression cannot call a method - `x.foo()` is available to data-on-* handlers only, because a call during a render is a side effect");default:throw new je(`unknown node type "${e.type}"`)}}function Qe(e,t={}){const n="string"==typeof e?e:String(e??""),o=!0===t.methodCalls,s=o?We:Te;if(s.has(n))return s.get(n);let i=null;try{i=Ye(n,o),He.set(i,n)}catch(e){const o=t.template?` in template "${t.template}"`:"";console.warn(`${Se} could not parse expression "${n}"${o}: ${e.message}. The binding is skipped.`),i=null}return s.size>=1e3&&s.clear(),s.set(n,i),i}function et(e,t){if(null!==e&&"object"==typeof e&&"string"==typeof e.type)try{return Ze(e,Ee(t),0)}catch(t){const n=He.get(e);return void console.warn(`${Se} expression ${void 0===n?"(not from parseExpression) ":`"${n}" `}threw during evaluation:`,t)}}function tt(e,t={}){const n=Qe(e,t);return null===n?null:e=>et(n,e)}function nt(e,t={}){const n="string"==typeof e?Qe(e,t):e,o=new Set;if(null===n||"object"!=typeof n)return o;const s=[n];for(;s.length>0;){const e=s.pop();if(null!==e&&"object"==typeof e)if("Identifier"!==e.type)if("Member"!==e.type||e.computed||"Identifier"!==e.object?.type||"$data"!==e.object.name&&"$root"!==e.object.name)for(const t of Ge(e))s.push(t);else o.add(e.property);else we.has(e.name)||o.add(e.name)}return o}function ot(e,t){if("string"!=typeof e||!function(e){if(0===e.length||!Oe.test(e[0]))return!1;for(const t of e.slice(1))if(!Ne.test(t))return!1;return!ze.has(e)}(e))throw new TypeError(`${Se} registerHelper: "${String(e)}" is not a valid helper name (it must be a plain identifier, so that an expression can spell it)`);if("function"!=typeof t)throw new TypeError(`${Se} registerHelper: "${e}" was given a ${typeof t}, not a function`);return Be.set(e,t),Ie.delete(e),t}const st=/\{\{#(if|unless|each|with)\s+([^}]+?)\s*\}\}/,it=/\{\{([#/])(if|unless|each|with)(?:\s+[^}]*?)?\s*\}\}|\{\{else\}\}/g,rt=/\{\{\{\s*([^{}]+?)\s*\}\}\}/g,at=/\{\{>\s*([^{}]+?)\s*\}\}/g,lt=/\{\{!\s*[^{}]*?\s*\}\}/g,dt=/\{\{(?!\{)\s*([^#/>!{}][^{}]*?)\s*\}\}/g,ct=/^[A-Za-z_$][\w$]*(?:\.[\w$]+)*$/,ht=/[?:()[\]'"!<>=*/%]|&&|\|\||\s[-+]\s/,ut={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},pt=e=>null==e?"":String(e);function mt(e){return Array.isArray(e)?e.length>0:Boolean(e)}function ft(e){if(!Array.isArray(e))return[];for(let t=0;t<e.length;t++){const n=e[t];if(null!==n&&"object"==typeof n&&!0===n._destroy)return e.filter(e=>!(null!==e&&"object"==typeof e&&!0===e._destroy))}return e}function gt(e,t,n){const o=e.trim();return"."===o?null!==t&&"object"==typeof t&&"."in t?t["."]:t:o.startsWith("@")?t?.[o]:ct.test(o)||!ht.test(o)?function(e,t){let n=e;for(const e of t.split(".")){if(null==n)return;n=n[e]}return n}(t,o):function(e,t,n={}){return et(Qe(e,n),t)}(o,t,n)}function vt(e,t,n){return e.replace(lt,"").replace(at,(e,o)=>{const s=n.partials?.[o.trim()];return void 0===s?"":yt(s,t,n)}).replace(rt,(e,o)=>pt(gt(o,t,n))).replace(dt,(e,o)=>pt(gt(o,t,n)).replace(/[&<>"']/g,e=>ut[e]))}function yt(e,t={},n={}){if("string"!=typeof e||0===e.length)return"";const o=e.match(st);if(!o)return vt(e,t,n);const[s,i,r]=o,a=o.index+s.length,{close:l,alternate:d}=function(e,t,n){let o=0,s=-1;for(const i of e.slice(n).matchAll(it)){const e=n+i.index;if(void 0!==i[1])if("#"!==i[1]){if(0!==o)o--;else if(i[2]===t)return{close:e,alternate:s}}else o++;else 0===o&&-1===s&&(s=e)}return{close:-1,alternate:-1}}(e,i,a);if(-1===l)return vt(e,t,n);const c="if"===i&&-1!==d&&d<l,h=e.slice(a,c?d:l),u=c?e.slice(d+8,l):"",p=vt(e.slice(0,o.index),t,n),m=yt(e.slice(l+`{{/${i}}}`.length),t,n),f=gt(r,t,n);let g="";if("if"===i)g=mt(f)?yt(h,t,n):yt(u,t,n);else if("unless"===i)g=mt(f)?"":yt(h,t,n);else if("each"===i){const e=ft(f);g=e.map((t,o)=>yt(h,function(e,t,n){const o={"@index":t,"@first":0===t,"@last":t===n-1};return null!==e&&"object"==typeof e?{...e,...o}:{".":e,...o}}(t,o,e.length),n)).join("")}else g=null!==f&&"object"==typeof f?yt(h,f,n):"";return p+g+m}const bt="[Domma Reactive]",kt=new Map,_t=new Set;function wt(e,t){_t.has(e)||(_t.add(e),console.warn(`${bt} ${t}`))}function Mt(e,t){if("string"!=typeof e||0===e.length)throw new TypeError(`${bt} registerBinding: the name must be a non-empty string`);if(null===t||"object"!=typeof t)throw new TypeError(`${bt} registerBinding: "${e}" was not given a handler object`);if("function"!=typeof t.update)throw new TypeError(`${bt} registerBinding: "${e}" has no update() function`);for(const n of["attach","detach"])if(void 0!==t[n]&&"function"!=typeof t[n])throw new TypeError(`${bt} registerBinding: "${e}".${n} is not a function`);return kt.has(e)&&console.warn(`${bt} registerBinding: "${e}" replaces an existing binding handler`),kt.set(e,Object.freeze({...t})),t}function xt(e){return kt.get(e)}function Lt(e){let t=null;for(const[n,o]of kt){if(o.attribute===e)return{kind:n,handler:o,arg:null};"string"==typeof o.attributePrefix&&e.startsWith(o.attributePrefix)&&e.length>o.attributePrefix.length&&(null===t||o.attributePrefix.length>t.handler.attributePrefix.length)&&(t={kind:n,handler:o,arg:e.slice(o.attributePrefix.length)})}return t}const Ct=e=>null==e?"":String(e);function Et(e,t){if(null===e||"object"!=typeof e)return null;if("Identifier"===e.type){if(we.has(e.name))return null;const n=t.$data;return null===n||"object"!=typeof n||(Object.isFrozen(n)||$e.has(e.name))?null:{object:n,key:e.name}}if("Member"===e.type){const n=et(e.object,t);if(null===n||"object"!=typeof n)return null;if(Object.isFrozen(n))return null;const o=Ct(e.computed?et(e.property,t):e.property);return $e.has(o)?null:{object:n,key:o}}return null}const St={tracks:!0,update({binding:e,nodes:t,context:n}){const o=Ct(e.evaluate(n));for(const e of t)e.textContent=o;return!0}},At={tracks:!0,update({binding:e,nodes:t,context:n,render:o}){for(const s of t)for(const t of e.parts){const e=o(t.tmpl,n.$data);s.setAttribute(t.name,e),"value"===t.name&&"value"in s&&(s.value=e)}return!0}},$t={tracks:!0,capturesBody:!0,update({binding:e,nodes:t,context:n,render:o,replaceRegion:s,reindex:i}){const r=o(e.body,n.$data);for(const e of t)s(e.open,e.close,r);return i(),!0}},zt={tracks:!0,region:!0,capturesBody:!0,primes:!0,attribute:"data-if",expression:!0,update({binding:e,nodes:t,context:n,render:o,replaceRegion:s,reindex:i}){const r=mt(e.evaluate(n))?o(e.body,n.$data):"";for(const e of t)s(e.open,e.close,r);return i(),!0}},jt=new WeakMap,Bt={attributePrefix:"data-on-",expression:!0,methodCalls:!0,tracks:!1,update:()=>!1,attach({binding:e,node:t,controller:n}){if(!e.arg)return;const o=t=>function(e,t,n){const o=e.ast;if(null===o)return;let s,i,r=n.$data;if("MethodCall"===o.type){r=et(o.object,n);s=Xe(r,o.computed?et(o.property,n):o.property),i=o.args.map(e=>et(e,n))}else"Call"===o.type?(s=et({type:"Identifier",name:o.callee},n),i=o.args.map(e=>et(e,n))):(s=et(o,n),i=[]);if("function"!=typeof s)return void wt(`event:${e.id}:${e.expr}`,`data-on-${e.arg}="${e.expr}" did not resolve to a function - an event binding names a handler on your data, or calls one`);!1===s.call(r,...i,t)&&t.preventDefault()}(e,t,n.context());t.addEventListener(e.arg,o);let s=jt.get(t);s||jt.set(t,s=new Map),s.set(e.id,{type:e.arg,listener:o})},detach({binding:e,node:t}){const n=jt.get(t)?.get(e.id);n&&(t.removeEventListener(n.type,n.listener),jt.get(t).delete(e.id))}};const Tt=new Set(["value","checked","selected","disabled","readonly","required","multiple","indeterminate","open","hidden"]),Wt=new WeakMap,Ht=new WeakMap,It={attributePrefix:"data-bind-",expression:!0,tracks:!0,primes:!0,update({binding:e,nodes:t,context:n}){const o=e.arg;if("html"===o)return wt("bind:html","data-bind-html is not supported - assigning innerHTML from data is an XSS hole. Use {{{triple-stache}}}, which says so where an author can see it."),!1;const s=e.evaluate(n);for(const n of t)"text"===o?n.textContent=Ct(s):"class"===o?Dt(e,n,s):"style"===o?Vt(e,n,s):o.startsWith("style-")?Ot(n,o.slice(6),s):Tt.has(o)&&o in n?n[o]="value"===o?Ct(s):Boolean(s):null==s||!1===s?n.removeAttribute(o):n.setAttribute(o,!0===s?"":Ct(s));return!0}};function Dt(e,t,n){let o=Wt.get(e);o||Wt.set(e,o=new WeakMap);for(const e of o.get(t)||[])t.classList.remove(e);const s=n?Ct(n).split(/\s+/).filter(Boolean):[];for(const e of s)t.classList.add(e);o.set(t,s)}function Ot(e,t,n){null!=n&&!1!==n&&""!==n?e.style.setProperty(t,Ct(n)):e.style.removeProperty(t)}function Nt(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function Vt(e,t,n){if(null!=n&&"object"!=typeof n)return void wt(`bind:style:${e.id}`,`data-bind-style="${e.expr}" needs an object of CSS properties - got `+typeof n+". For a single property use data-bind-style-<property>.");let o=Ht.get(e);o||Ht.set(e,o=new WeakMap);const s=o.get(t)||[],i=[];for(const[e,o]of Object.entries(n||{})){const n=Nt(e);Ot(t,n,o),i.push(n)}for(const e of s)i.includes(e)||t.style.removeProperty(e);o.set(t,i)}const Pt=Symbol("dm:option-value"),Rt=Symbol("dm:pending-value"),Ft={attribute:"data-options",expression:!0,tracks:!0,primes:!0,update({binding:e,nodes:t,context:n}){const o=ft(e.evaluate(n));for(const s of t)Ut(e,s,o,n);return!0}};function qt(e,t){const n=e.getAttribute(t);return null===n||""===n.trim()?null:tt(n)}function Ut(e,t,n,o){if("SELECT"!==t.tagName)return void wt(`options:${e.id}`,`data-options="${e.expr}" is on <${t.tagName.toLowerCase()}>, which has no options. Put it on a <select>.`);const s=qt(t,"data-options-text"),i=qt(t,"data-options-value"),r=qt(t,"data-options-caption"),a=Rt in t?[].concat(t[Rt]):function(e){return[...e.options].filter(e=>e.selected).map(e=>Pt in e?e[Pt]:e.value)}(t);if(t.textContent="",r){const e=document.createElement("option");e.value="",e.textContent=Ct(r(o)),t.appendChild(e)}n.forEach((e,r)=>{const a=Le(o,e,r,n.length),l=document.createElement("option");l.textContent=Ct(s?s(a):e);const d=i?i(a):e;null==d||"object"==typeof d?(l.value=`\0opt:${r}`,l[Pt]=d):"string"!=typeof d?(l.value=Ct(d),l[Pt]=d):l.value=d,t.appendChild(l)}),function(e,t){if(0===t.length)return;let n=!1;for(const o of e.options){const s=Pt in o?o[Pt]:o.value,i=t.some(e=>e===s);e.multiple?(o.selected=i,n=n||i):i&&!n&&(o.selected=!0,n=!0)}e.multiple||n||(e.selectedIndex=e.options.length>0?0:-1);n&&delete e[Rt]}(t,a)}const Kt={attribute:"data-model",expression:!0,tracks:!0,primes:!0,update({binding:e,nodes:t,context:n}){const o=e.evaluate(n);for(const e of t)Xt(e,o);return!0},attach({binding:e,node:t,controller:n}){const o=()=>{const o=n.context(),s=Et(e.ast,o);if(null===s)return void wt(`model:${e.id}:${e.expr}`,`data-model="${e.expr}" is not a settable path, so nothing was written`);const i=function(e){switch(Jt(e)){case"checkbox":return e.checked;case"radio":return e.checked?e.value:Yt;case"select-multiple":return Array.from(e.options).filter(e=>e.selected).map(Gt);case"select":return-1===e.selectedIndex?"":Gt(e.options[e.selectedIndex]);case"number":return""===e.value?null:Number(e.value);default:return e.value}}(t);i!==Yt&&(s.object[s.key]=i)},s=function(e){const t=Jt(e);return"text"===t||"number"===t?["input","change"]:["change"]}(t);for(const e of s)t.addEventListener(e,o);let i=jt.get(t);i||jt.set(t,i=new Map),i.set(e.id,{type:s,listener:o})},detach({binding:e,node:t}){const n=jt.get(t)?.get(e.id);if(n){for(const e of n.type)t.removeEventListener(e,n.listener);jt.get(t).delete(e.id)}}},Yt=Symbol("no-write");function Jt(e){const t=e.tagName;if("SELECT"===t)return e.multiple?"select-multiple":"select";if("INPUT"!==t)return"text";const n=String(e.type||"").toLowerCase();return"checkbox"===n||"radio"===n?n:"number"===n||"range"===n?"number":"text"}function Gt(e){return Pt in e?e[Pt]:e.value}function Xt(e,t){switch(Jt(e)){case"checkbox":{const n=Boolean(t);return void(e.checked!==n&&(e.checked=n))}case"radio":{const n=Ct(t)===e.value;return void(e.checked!==n&&(e.checked=n))}case"select-multiple":{const n=Array.isArray(t)?t:[];if(0===e.options.length)return void(n.length>0&&(e[Rt]=n));const o=new Set(n.map(Ct));for(const t of e.options){const e=Gt(t),s=n.some(t=>t===e)||o.has(t.value);t.selected!==s&&(t.selected=s)}return}case"select":{const n=function(e,t){return[...e.options].find(e=>Gt(e)===t)||null}(e,t);if(n)return n.selected||(n.selected=!0),void delete e[Rt];const o=Ct(t);return e.value!==o&&(e.value=o),void(e.value!==o?e[Rt]=t:delete e[Rt])}default:{const n=Ct(t);e.value!==n&&(e.value=n)}}}const Zt=new WeakSet,Qt={attribute:"data-focus",expression:!0,tracks:!0,primes:!0,update({binding:e,nodes:t,context:n}){const o=mt(e.evaluate(n));for(const e of t){if("function"!=typeof e.focus)continue;if(o!==(e.ownerDocument.activeElement===e)){Zt.add(e);try{o?e.focus():e.blur()}finally{Zt.delete(e)}}}return!0},attach({binding:e,node:t,controller:n}){const o=o=>{if(Zt.has(t))return;const s=n.context(),i=Et(e.ast,s);null!==i?i.object[i.key]="focus"===o.type:wt(`focus:${e.id}:${e.expr}`,`data-focus="${e.expr}" is not a settable path, so focus was not written back. Focus still follows the value.`)},s=["focus","blur"];for(const e of s)t.addEventListener(e,o);let i=jt.get(t);i||jt.set(t,i=new Map),i.set(e.id,{type:s,listener:o})},detach({binding:e,node:t}){const n=jt.get(t)?.get(e.id);if(n){for(const e of n.type)t.removeEventListener(e,n.listener);jt.get(t).delete(e.id)}}};Mt("text",St),Mt("attr",At),Mt("block",$t),Mt("raw",$t),Mt("if",zt),Mt("event",Bt),Mt("bind",It),Mt("model",Kt),Mt("options",Ft),Mt("focus",Qt);const en=new WeakMap;let tn=0;function nn(e,t){if(null==e||"function"!=typeof t)return;let n=en.get(e);n||en.set(e,n=new Set),n.add(t),tn++}function on(e){const t=en.get(e);if(t){en.delete(e),tn-=t.size;for(const e of t)try{e()}catch(e){console.warn("[Domma Reactive] a disposer threw:",e)}}}function sn(e){if(0===tn||null==e)return;if(on(e),1!==e.nodeType&&11!==e.nodeType)return;const t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_COMMENT,null),n=[];let o;for(;o=t.nextNode();)en.has(o)&&n.push(o);for(const e of n)on(e)}const rn=["data-dm-t","data-dm-a","data-dm-b"];rn.map(e=>`[${e}]`).join(",");const an=e=>`\x3c!--dm:${e}--\x3e`,ln=e=>`\x3c!--/dm:${e}--\x3e`;function dn(e){const t=document.createElement("template");return t.innerHTML=e,t.content}function cn(e,t){const n=[];for(let o=e.nextSibling;o&&o!==t;o=o.nextSibling)n.push(o);return n}function hn(e,t,n){const o=e.parentNode;if(!o)return;let s=e.nextSibling;for(;s&&s!==t;){const e=s.nextSibling;sn(s),o.removeChild(s),s=e}n&&o.insertBefore(dn(n),t)}const un="[Domma Reactive]";function pn(e){const{bindings:t,getRoots:n,render:o,reactive:s=!1,label:i="",repaint:r=null}=e,a=new Map(t.map(e=>[e.id,e]));for(const e of t)e.seen=new WeakSet;const l=new Map;let d=[],c=!1,h=!1,u=Ee(e.context);function p(){h||(function(e,t,n){for(const e of n)e.nodes=null;const o=(e,n)=>{const o=t.get(e);o&&(o.nodes||=[]).push(n)},s=e=>{for(const t of rn){const n=e.getAttribute(t);if(null!==n)for(const t of n.split(/\s+/))o(t,e)}},i=new Map,r=e=>{const t=e.data;if(t.startsWith("/dm:")){const n=t.slice(4),s=i.get(n);if(!s)return;o(n,{open:s,close:e}),i.delete(n)}else t.startsWith("dm:")&&i.set(t.slice(3),e)};for(const t of e){if(8===t.nodeType){r(t);continue}if(1!==t.nodeType&&11!==t.nodeType)continue;1===t.nodeType&&s(t);const e=t.ownerDocument.createTreeWalker(t,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_COMMENT,null);let n;for(;n=e.nextNode();)8===n.nodeType?r(n):s(n)}}(n(),a,t),function(){for(const e of t){if(null===e.nodes){f(e.id);continue}const t=xt(e.kind);let n=!1;for(const o of e.nodes){const s=void 0===o.nodeType?o.open:o;e.seen.has(s)||(e.seen.add(s),n=!0,void 0!==o.nodeType&&t?.attach?.({binding:e,node:o,controller:g}))}n&&(s||!0===e.prime)&&d.push(e)}}(),function(){if(c)return;c=!0;try{let e=0;for(;d.length>0;){if(++e>20){console.warn(`${un} a binding kept revealing new nodes after 20 rounds; giving up so the page still renders. Kinds still pending: ${[...new Set(d.map(e=>e.kind))].join(", ")}`);break}const t=d;d=[];for(const e of[!0,!1])for(const n of t)!0===xt(n.kind)?.region===e&&m(n)}}finally{c=!1,d=[]}}())}function m(e){if(!s)return void g.update(e.id);const t=l.get(e.id);!t||t.disposed?l.set(e.id,ce(()=>g.update(e.id),{label:`${i||"binding"}:${e.id}`})):t.recompute()}function f(e){const t=l.get(e);t&&(l.delete(e),t.dispose())}const g={bindings:t,deps:e=>a.get(e)?.deps||new Set,context:()=>u,setContext(e){u=Ee(e)},refresh(e=null){for(const n of t)null!==n.nodes&&0!==n.nodes.length&&(null!==e&&!0!==e(n)||m(n))},index:p,update(e,t){if(void 0!==t&&(u=Ee(t)),h)return!1;const n=a.get(e);if(!n||!n.nodes||0===n.nodes.length)return!1;const s=xt(n.kind);return void 0!==s&&!0===s.update({binding:n,nodes:n.nodes,context:u,render:o,replaceRegion:hn,reindex:p,controller:g})},updateAll(e){void 0!==e&&(u=Ee(e));for(const e of t)g.update(e.id)},rerenderAll(e){void 0!==e&&(u=Ee(e)),r?.(u),p()},rerender(e){g.rerenderAll(e)},destroy(){h=!0;for(const e of t){const t=xt(e.kind);if(void 0!==t?.detach&&null!==e.nodes)for(const n of e.nodes)void 0!==n.nodeType&&t.detach({binding:e,node:n,controller:g})}for(const e of l.values())e.dispose();l.clear();for(const e of n())sn(e)},effectCount:()=>l.size};return g}const mn=new WeakMap,fn=new Set;function gn(e,t){fn.has(e)||(fn.add(e),console.warn(`[Domma Reactive] ${t}`))}function vn(e,t,n,o,s,i={}){const r=document.createComment("dm:item"),a=document.createComment("/dm:item"),l=e.content.cloneNode(!0);l.insertBefore(r,l.firstChild),l.appendChild(a);const d=pn({bindings:e.bindings.map(e=>({...e})),render:e.render,context:i.context??Le(t,n,o,s),getRoots:()=>cn(r,a),reactive:!0,label:e.label}),c={key:null,item:n,index:o,length:s,parentContext:t,open:r,close:a,runtime:d,disposed:!1,allNodes:()=>[r,...cn(r,a),a],refresh(t,n,o,s){const i=t.$data!==c.parentContext.$data||t.$root!==c.parentContext.$root||n!==c.item,r=o!==c.index||!0===e.usesLength&&s!==c.length;return c.item=n,c.index=o,c.length=s,c.parentContext=t,!(!i&&!r)&&(d.setContext(Le(t,n,o,s)),d.refresh(i?null:e=>!0===e.positional),!0)},dispose(e=!0){if(c.disposed)return;c.disposed=!0,function(e,t){const n=en.get(e);!n||!n.delete(t)||(tn--,0===n.size&&en.delete(e))}(r,h),d.destroy();for(const e of cn(r,a))sn(e);if(!e)return;const t=r.parentNode;if(t)for(const e of c.allNodes())t.removeChild(e)}},h=()=>c.dispose(!1);return nn(r,h),d.index(),c}function yn(e,t){let n=e;for(const e of t.split(".")){if(null==n)return;n=n[e]}return n}function bn(e,t,n,o,s,i){let r=mn.get(e.open);void 0===r&&(r={byKey:new Map},mn.set(e.open,r),nn(e.open,()=>{for(const e of r.byKey.values())e.dispose(!1);r.byKey=new Map}));const a=r.byKey,l=new Map,d=[],c=ft(t);for(let e=0;e<c.length;e++){const t=c[e];let r=yn(t,o);null==r?(gn(`key:missing:${i}:${o}`,`key=${o} is missing on an item of ${i} - falling back to position for that item, which reconciles no better than an unkeyed block. Give every item a stable identifier.`),r=`\0position:${e}`):l.has(r)&&(gn(`key:duplicate:${i}:${o}`,`two items of ${i} share key=${o} value "${String(r)}" - a key must identify exactly one item. The duplicate is being kept apart by position, so it will not reconcile across changes.`),r=`\0duplicate:${e}:${String(r)}`);let h=a.get(r);void 0===h?(h=vn(n,s,t,e,c.length),h.key=r):(a.delete(r),h.refresh(s,t,e,c.length)),l.set(r,h),d.push(h)}for(const e of a.values())e.dispose();!function(e,t){const n=e.parentNode;if(!n)return;let o=e;for(const e of t)if(o.nextSibling!==e.open)for(const t of e.allNodes())n.insertBefore(t,o.nextSibling),o=t;else o=e.close}(e.open,d),r.byKey=l}function kn(e){return{tracks:!0,region:!0,primes:!0,update({binding:t,nodes:n,context:o,render:s}){const i=e(t,s),r=(a=t.evaluate(o),Array.isArray(a)?a:null!==a&&"object"==typeof a&&Array.isArray(a.value)?a.value:[]);var a;for(const e of n)bn(e,r,i,t.keyPath,o,i.label);return!0}}}const _n="[Domma Reactive]",wn=new Map,Mn=new Set;function xn(e,t){Mn.has(e)||(Mn.add(e),console.warn(`${_n} ${t}`))}function Ln(e){return wn.get(e)}const Cn="data-param-";function En(e){return e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function Sn(e,t,n){const o={},s=e.getAttribute("data-params");if(null!==s&&""!==s.trim()){const e=tt(s),i=null===e?null:e(n);null===e?xn(`component:params:${t.id}`,`data-params="${s}" did not parse, in ${t.expr}`):null===i||"object"!=typeof i?xn(`component:params:${t.id}`,`data-params="${s}" needs an object of params - got ${null===i?"null":typeof i}, in ${t.expr}`):Object.assign(o,i)}for(const s of[...e.attributes]){if(!s.name.startsWith(Cn))continue;const e=En(s.name.slice(11));if(""===e)continue;const i=tt(s.value);null!==i?(e in o&&xn(`component:collide:${t.id}:${e}`,`"${e}" is given by both data-params and ${s.name}, in ${t.expr}. The attribute wins, but one of the two is redundant.`),o[e]=i(n)):xn(`component:param:${t.id}:${e}`,`${s.name}="${s.value}" did not parse, in ${t.expr}`)}return Object.freeze(o)}function An(e){const t=new Map;for(const n of[...e.childNodes]){const e=1===n.nodeType?n.getAttribute("data-slot")??"":"";t.has(e)||t.set(e,[]),t.get(e).push(n),n.remove()}return t}function $n(e,t){const n=`dm:${t}`,o=`/dm:${t}`;let s=null,i=null;const r=e=>{if(8!==e.nodeType)for(const t of e.childNodes)r(t);else e.data===n?s=e:e.data===o&&(i=e)};for(const t of e)if(r(t),null!==s&&null!==i)return{open:s,close:i};return null}function zn(e,t){const n=[];for(let o=e.nextSibling;null!==o&&o!==t;o=o.nextSibling)n.push(o);return n}function jn(e,t,n,o,s){const i=[],r=e.allNodes(),a=new Set;for(const e of t.slots??[]){if(a.has(e.name)){xn(`component:slot:duplicate:${o.id}:${s}:${e.name}`,`the component "${s}" declares more than one `+(""===e.name?"default slot":`slot named "${e.name}"`)+". The first is filled and the rest keep their fallback content.");continue}a.add(e.name);const t=n.get(e.name);if(void 0===t||0===t.length)continue;const l=$n(r,e.id);if(null!==l){for(const e of zn(l.open,l.close))e.remove();for(const e of t)l.close.parentNode.insertBefore(e,l.close);i.push({name:e.name,nodes:t})}}for(const[e,t]of n)a.has(e)||0===t.length||t.every(e=>3===e.nodeType&&""===e.data.trim())||xn(`component:slot:unmatched:${o.id}:${s}:${e}`,""===e?`the component "${s}" was given content but declares no {{#slot}}, so that content is not rendered. Add a slot to its template, or remove the content.`:`the component "${s}" has no slot named "${e}", so that content is not rendered. Check data-slot against the template's {{#slot}} blocks.`);return i}const Bn=new WeakMap;function Tn(e,t,n,o,s){if(void 0===e.create)return t;try{return e.create(t,{element:n})}catch(e){return xn(`component:create:${o.id}:${s}`,`the component "${s}" threw while being created, in ${o.expr}: ${e&&e.message}`),null}}function Wn(e){if(null===e.instance)return;for(const{nodes:t}of e.placed)for(const e of t)e.remove();e.placed=[];const t=e.viewModel;if(null!==t&&"object"==typeof t&&"function"==typeof t.dispose)try{t.dispose()}catch(e){console.warn(`${_n} a component's dispose() threw:`,e)}e.instance.dispose(),e.instance=null,e.viewModel=null,e.name=null}const Hn="[Domma Reactive]",In=/\{\{([#/])(if|unless|each|with|slot)(?:\s+([^}]+?))?\s*\}\}/g,Dn=/\{\{\{\s*([^{}]+?)\s*\}\}\}/g,On=/\{\{(?!\{)\s*([^#/>!{}][^{}]*?)\s*\}\}/g,Nn=/\{\{>\s*[^{}]+?\s*\}\}/,Vn=/\sdata-each\s*=\s*(?:"([^"]*)"|'([^']*)')/,Pn=/<([a-zA-Z][\w:-]*)((?:"[^"]*"|'[^']*'|[^>"'])*?)(\/?)>/g,Rn=/([\w:@.-]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/g,Fn=/^[A-Za-z_$][\w$]*(?:\.[\w$]+)*$/,qn=/&(?:lt|gt|quot|apos|nbsp|amp|#39|#x27);/g,Un={"&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&#39;":"'","&#x27;":"'","&nbsp;":" ","&amp;":"&"};function Kn(e){return e.includes("&")?e.replace(qn,e=>Un[e]):e}const Yn=/^[@.]/,Jn={".":e=>e.$data,"@index":e=>e.$index,"@first":e=>0===e.$index,"@last":e=>null!==e.$length&&e.$index===e.$length-1},Gn=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Xn={text:"txt",attr:"attr",raw:"raw",block:"blk"};function Zn(e,t){if(0===t.length)return e;const n=[...t].sort((e,t)=>e.index-t.index||(e.order??0)-(t.order??0));let o="",s=0;for(const t of n)t.index<s||(o+=e.slice(s,t.index)+t.text,s=t.index+(t.skip??0));return o+e.slice(s)}function Qn(e,t){for(const[n,o]of t)if(e>=n&&e<o)return!0;return!1}function eo(e){return String(e).trim().split(".")[0]}function to(e,t){const n=String(t).trim().split(".");let o=e;for(const e of n){if(null==o)return;o=o[e]}return o}function no(e){const t=new Set;for(const n of e.matchAll(On)){const e=n[1].trim();Fn.test(e)&&t.add(eo(e))}for(const n of e.matchAll(Dn)){const e=n[1].trim();Fn.test(e)&&t.add(eo(e))}return t}function oo(e){const t=[],n=[];for(const o of e.matchAll(In)){if("#"===o[1]){t.push({start:o.index,kind:o[2],expr:(o[3]||"").trim()});continue}let e=null;for(;t.length>0;){const n=t.pop();if(n.kind===o[2]){e=n;break}}e&&n.push({start:e.start,end:o.index+o[0].length,kind:e.kind,expr:e.expr})}return n}function so(e,t){const n=e.lastIndexOf("<",t);return-1!==n&&n>e.lastIndexOf(">",t)}function io(e,t){const n=t[1],o=t.index,s=o+t[0].length;if("/"===t[3]||Gn.has(n.toLowerCase()))return[o,s];const i=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=new RegExp(`<(/?)${i}(?=[\\s/>])`,"gi");let a=1;for(const t of e.slice(s).matchAll(r)){const n=s+t.index;if("/"===t[1]){if(a--,a>0)continue;const t=e.indexOf(">",n);return-1===t?null:[o,t+1]}const i=e.indexOf(">",n);-1!==i&&"/"===e[i-1]||a++}return null}function ro(e,t){const n=[];for(const o of t){if("each"!==o.kind&&"with"!==o.kind)continue;const t=e.indexOf(an(o.id)),s=e.indexOf(ln(o.id));-1!==t&&-1!==s&&n.push([t,s])}return n}const ao=/^([\s\S]*?)\s+key\s*=\s*([A-Za-z_$][\w$]*(?:\.[\w$]+)*)\s*$/,lo=/\s+key\s*=\s*[A-Za-z_$][\w$]*(?:\.[\w$]+)*/,co=new Set;function ho(e){const t=ao.exec(String(e));return null===t||""===t[1].trim()?null:{collection:t[1].trim(),key:t[2]}}function uo(e,t){const n=/^\{\{#(?:if|unless|each|with|slot)(?:\s+[^}]*?)?\s*\}\}/.exec(e.slice(t.start,t.end)),o=/\{\{\/(?:if|unless|each|with|slot)\s*\}\}$/.exec(e.slice(t.start,t.end));return null===n||null===o?[t.start,t.end]:[t.start+n[0].length,t.start+o.index]}function po(e,t){const n=[];for(const o of t){if(!0!==xt(o.kind)?.capturesBody)continue;const t=an(o.id),s=e.indexOf(t),i=e.indexOf(ln(o.id));-1!==s&&-1!==i&&n.push([s+t.length,i])}n.sort((e,t)=>e[0]-t[0]);let o="",s=0;for(const[t,i]of n)t<s||(o+=e.slice(s,t),s=i);return o+=e.slice(s),o.replace(/\{\{\{[^{}]*\}\}\}/g,"").replace(/\{\{[^{}]*\}\}/g,"")}const mo=/\$index|\$length|@index|@first|@last/;function fo(e){const t=(e.parts??[]).map(e=>e.tmpl).join(" ");return`${e.expr??""} ${e.body??""} ${t}`}let go=0;function vo(e,t,n,o,s){const{annotated:i,bindings:r,slots:a}=wo(e,{...o,itemForms:!0,template:t,idPrefix:s});for(const e of r)e.positional=mo.test(fo(e));return{content:dn(po(i,r)),bindings:r,slots:a,render:n,label:t,options:o,usesLength:/@last|\$length/.test(e)}}function yo(e,t){if(!1===t.warnUnkeyed)return;const n=`${t.template??""}|${e}`;if(co.has(n))return;co.add(n);const o=t.template?` in template "${t.template}"`:"";console.warn(`${Hn} {{#each ${e}}}${o} has no key=, so it re-renders the whole block on every change - losing DOM node identity, focus and uncommitted input. Write {{#each ${e} key=id}}, naming whichever property identifies an item, to reconcile instead.`)}function bo(e,t){const n=`demoted|${t.template??""}|${e}`;if(co.has(n))return;co.add(n);const o=t.template?` in template "${t.template}"`:"";console.warn(`${Hn} {{#each ${e}}}${o} sits inside an unkeyed {{#each}} or a {{#with}}, so it cannot reconcile: its collection would be resolved against the top-level data. It has been demoted to a plain re-rendered block. Add key= to the ENCLOSING block and both will reconcile.`)}function ko(e,t){return null===e.factoryBox.value&&(e.factoryBox.value=function(e,t,n){const o=`${n.template?`${n.template} `:""}{{#each ${e.expr}}}`;return Nn.test(e.body)&&console.warn(`${Hn} {{> partial}} inside a keyed {{#each}} is not expanded - the block body is compiled once into a <template>, before any render pass exists to resolve a partial against. Inline it, in ${o}`),vo(e.body,o,t,n,`i${++go}:`)}(e,t,e.factoryBox.options)),e.factoryBox.value}function _o(e,t,n){const o={...n,methodCalls:!0===t.methodCalls},s=Qe(e,o);return null===s?null:{ast:s,evaluate:tt(e,o),deps:!1===t.tracks?new Set:nt(s)}}function wo(e,t={}){const n=[],o=[],s=new Set,i=t.idPrefix??"",r=(e,n)=>{if(s.has(e))return;s.add(e);const o=t.template?` in template "${t.template}"`:"";console.warn(`${Hn} ${n}${o}`)},a=Vn.exec(e);if(null!==a){const e=a[1]??a[2]??"";r("inert-each",`data-each="${e}" does nothing here. It is an applyBindings spelling, and this is compiled markup - write {{#each ${e}}} … {{/each}} instead. A data-each nested inside another list is compiled markup too, which is the usual way to meet this`)}for(const t of e.matchAll(Pn)){const e=t[2]||"";if(!e.includes("data-param-"))continue;if(/\sdata-component\s*=/.test(e))continue;const n=/\s(data-param-[\w-]+)/.exec(e);r("orphan-param",`${null===n?"data-param-*":n[1]} does nothing on an element with no data-component. Check the component attribute is present and spelled correctly - and remember its value is an expression, so a literal name takes quotes: data-component="'my-thing'"`)}const l=oo(e),d=function(e){const t=[];for(const n of e.matchAll(Pn)){const o=n[2]||"";if(o.includes("data-"))for(const s of o.matchAll(Rn)){const o=Lt(s[1]);if(null===o||!o.handler.region)continue;const i=io(e,n);if(null===i)break;t.push({start:i[0],end:i[1],kind:o.kind,arg:o.arg,expr:Kn(void 0!==s[2]?s[2]:s[3]||"").trim()});break}}return t}(e),c=[],h=new Set,u=l.filter(e=>"with"===e.kind||"each"===e.kind&&null===ho(e.expr)).map(e=>[e.start,e.end]);for(const e of l)"each"===e.kind&&null!==ho(e.expr)&&(u.some(([t,n])=>e.start>t&&e.end<=n)?(h.add(e.start),bo(e.expr,t)):c.push([e.start,e.end]));const p=(e,t)=>c.some(([n,o])=>e>n&&t<=o),m=[...l.map((e,t)=>({...e,id:`${i}${t}_blk`,mustache:!0})).filter(e=>!p(e.start,e.end)),...d.map((e,t)=>({...e,id:`${i}${l.length+t}_${e.kind}`})).filter(e=>!p(e.start,e.end))],f=[];for(const n of m){if(n.mustache&&h.has(n.start)){const t=e.slice(n.start,n.end),o=lo.exec(t);null!==o&&f.push({index:n.start+o.index,text:"",order:1,skip:o[0].length}),n.expr=ho(n.expr)?.collection??n.expr}if(n.mustache&&"slot"===n.kind){const[t,s]=uo(e,n);f.push({index:n.start,text:an(n.id),order:1,skip:t-n.start}),f.push({index:s,text:ln(n.id),order:0,skip:n.end-s}),o.push({id:n.id,name:n.expr});continue}const s=n.mustache&&"each"===n.kind&&!h.has(n.start)&&ho(n.expr);if(s){f.push({index:n.start,text:an(n.id)+ln(n.id),order:1,skip:n.end-n.start}),n.keyed=s;const[t,o]=uo(e,n);n.rawBody=e.slice(t,o);continue}n.mustache&&"each"===n.kind&&yo(n.expr,t),f.push({index:n.start,text:an(n.id),order:1}),f.push({index:n.end,text:ln(n.id),order:0})}let g=Zn(e,f),v=m.length;const y=e=>`${i}${v++}_${Xn[e]??e}`;for(const e of m){if("slot"===e.kind)continue;if(-1===g.indexOf(an(e.id)))continue;if(e.keyed){const o=xt("each"),s=_o(e.keyed.collection,o,t);if(null===s)continue;n.push({id:e.id,kind:"each",blockKind:"each",expr:e.keyed.collection,keyPath:e.keyed.key,body:e.rawBody,ast:s.ast,evaluate:s.evaluate,deps:s.deps,prime:!0===o.primes,factoryBox:{value:null,options:t},nodes:null});continue}if(e.mustache){n.push({id:e.id,kind:"block",blockKind:e.kind,expr:e.expr,body:"",deps:Fn.test(e.expr)?new Set([eo(e.expr)]):no(e.expr),nodes:null});continue}const o=xt(e.kind),s=_o(e.expr,o,t);null!==s&&n.push({id:e.id,kind:e.kind,arg:e.arg,expr:e.expr,body:"",ast:s.ast,evaluate:s.evaluate,deps:s.deps,prime:!0===o.primes,nodes:null})}const b=[];for(const e of[...g.matchAll(Dn)]){if(Qn(e.index,ro(g,m)))continue;const t=e[1].trim();if(!Fn.test(t))continue;const o=y("raw");b.push({index:e.index,text:an(o),order:1}),b.push({index:e.index+e[0].length,text:ln(o),order:0}),n.push({id:o,kind:"raw",expr:t,body:e[0],deps:new Set([eo(t)]),nodes:null})}g=Zn(g,b);const k=n.filter(e=>"raw"===e.kind).map(e=>{const t=g.indexOf(an(e.id)),n=g.indexOf(ln(e.id));return-1!==t&&-1!==n?[t,n+ln(e.id).length]:null}).filter(Boolean),_=ro(g,m),w=[];for(const e of[...g.matchAll(On)]){if(Qn(e.index,_))continue;if(Qn(e.index,k))continue;if(so(g,e.index))continue;const o=Mo(e[1].trim(),t,r);if(null===o)continue;const s=y("text");w.push({index:e.index,text:`<span data-dm-t="${s}">`,order:1}),w.push({index:e.index+e[0].length,text:"</span>",order:0}),n.push({id:s,...o,nodes:null})}g=Zn(g,w);const M=ro(g,m),x=[];for(const e of[...g.matchAll(Pn)]){const o=e[2]||"",s=Qn(e.index,M),i=[],a=[];for(const e of o.matchAll(Rn)){const o=e[1];if(o.startsWith("data-dm-"))continue;const l=void 0!==e[2]?e[2]:e[3]||"",d=Lt(o);if(null!==d){if(d.handler.region)continue;if(s){r(`shifted:${o}`,`"${o}" inside an {{#each}} or {{#with}} block is not bound - per-item bindings arrive with the reconciler. Move it outside the block, or wire it up imperatively for now`);continue}const e=d.handler,i=Kn(l).trim(),c=!1===e.expression?{ast:null,evaluate:null,deps:new Set}:_o(i,e,t);if(null===c)continue;const h=y(d.kind);a.push(h),n.push({id:h,kind:d.kind,arg:d.arg,expr:i,ast:c.ast,evaluate:c.evaluate,deps:c.deps,prime:!0===e.primes,nodes:null});continue}if(s)continue;if(!l.includes("{{"))continue;const c=no(l);0!==c.size&&i.push({name:o,tmpl:l,deps:[...c]})}const l=e.index+e[0].length-(e[3]?2:1);if(i.length>0){const e=y("attr"),t=new Set;for(const e of i)for(const n of e.deps)t.add(n);x.push({index:l,text:` data-dm-a="${e}"`,order:1}),n.push({id:e,kind:"attr",parts:i,deps:t,nodes:null})}a.length>0&&x.push({index:l,text:` data-dm-b="${a.join(" ")}"`,order:1})}g=Zn(g,x);for(const e of n){if(!0!==xt(e.kind)?.capturesBody)continue;const t=an(e.id),n=g.indexOf(t),o=g.indexOf(ln(e.id));-1!==n&&-1!==o&&(e.body=g.slice(n+t.length,o))}return{annotated:g,bindings:n,slots:o}}function Mo(e,t,n){if(!0===t.itemForms&&void 0!==Jn[e])return{kind:"text",expr:e,evaluate:Jn[e],deps:new Set,prime:!0};if(Fn.test(e)){if(e.startsWith("$")){const n=_o(e,xt("text"),t);return null===n?null:{kind:"text",expr:e,ast:n.ast,evaluate:n.evaluate,deps:n.deps,prime:!0}}return{kind:"text",expr:e,evaluate:t=>to(t.$data,e),deps:new Set([eo(e)]),prime:!1}}if(Yn.test(e)||!ht.test(e))return null;const o=_o(e,xt("text"),t);return null===o?(n(`expr:${e}`,`"{{${e}}}" is not bound`),null):{kind:"text",expr:e,ast:o.ast,evaluate:o.evaluate,deps:o.deps,prime:!0}}Mt("each",kn(ko));const xo=new WeakMap;!function(e){Mt("component",function(e){return{tracks:!0,primes:!0,attribute:"data-component",expression:!0,update({binding:t,nodes:n,context:o,render:s}){const i=t.evaluate(o);for(const r of n){let n=Bn.get(r);if(void 0===n&&(n={name:null,instance:null,viewModel:null,slots:null,placed:[]},Bn.set(r,n),nn(r,()=>Wn(n))),n.name===i&&null!==n.instance)continue;if(Wn(n),null===n.slots&&(n.slots=An(r)),r.replaceChildren(),"string"!=typeof i||""===i){xn(`component:name:${t.id}`,`data-component="${t.expr}" needs a component name - got `+(null===i?"null":typeof i)+". Remember that a literal name takes quotes, because every binding value is an expression: data-component=\"'my-thing'\"");continue}const a=Ln(i);if(void 0===a){xn(`component:missing:${t.id}:${i}`,`no component is registered as "${i}", in ${t.expr}`);continue}const l=Tn(a,Sn(r,t,o),r,t,i);if(null===l)continue;const d=e(a,i,s,t.options??{});n.name=i,n.viewModel=l,n.instance=vn(d,o,l,null,null,{context:Ce(o,l)}),n.placed=jn(n.instance,d,n.slots,t,i),n.placed.length>0&&n.instance.runtime.index(),r.append(...n.instance.allNodes())}return!0},detach({node:e}){const t=Bn.get(e);void 0!==t&&Wn(t)}}}(e))}(function(e,t,n,o){let s=xo.get(e);return void 0===s&&(s=function(e,t,n,o){return vo(e,t,n,o,`c${++go}:`)}(e.template,`component ${t}`,n,o),xo.set(e,s)),s});const Lo={annotate:wo,compile:function(e,t,n,o,s={}){const i="function"==typeof o?o:yt,{annotated:r,bindings:a}=wo(e,s),l=e=>{n.replaceChildren(dn(i(r,e.$data)))},d=pn({bindings:a,render:i,context:Ee(t),getRoots:()=>[...n.childNodes],reactive:!0===s.reactive,label:s.template,repaint:l});return l(d.context()),d.index(),d},scanBlocks:oo,resolvePath:to},Co="[Domma Reactive]",Eo="data-each",So=/^([\s\S]*?)\s+key\s*=\s*([A-Za-z_$][\w$]*(?:\.[\w$]+)*)\s*$/,Ao=/^\s*dm\s+([a-zA-Z][\w-]*)\s*:\s*([\s\S]+?)\s*$/,$o=/^\s*\/dm\s*$/,zo=/\{\{\s*[\w$][\w$.]*\s*\}\}/,jo="data-dm-bound",Bo=new WeakSet,To=new Set;function Wo(e,t){To.has(e)||(To.add(e),console.warn(`${Co} ${t}`))}function Ho(e){if(!e||1!==e.nodeType)return String(e);const t=e.id?`#${e.id}`:"",n=e.classList?.length?`.${[...e.classList].join(".")}`:"";return`<${e.tagName.toLowerCase()}${t}${n}>`}function Io(e,t){if(null!=e&&1===e.nodeType&&!1!==t(e))for(const n of[...e.children])Io(n,t)}function Do(e,t,n={}){if(null==t||1!==t.nodeType)throw new TypeError(`${Co} applyBindings: expected an element to activate, got ${String(t)}`);const o="function"==typeof n.render?n.render:yt,s=n.template||Ho(t);let i=Ee(e);const r=[],a=[],l=[];let d=!1,c=0;const h={context:()=>i,update:()=>!1,bindings:[]},u=function(e,t){const n=[];let o=0;const s=e=>{const i=[];for(const t of[...e.childNodes]){if(8===t.nodeType){if($o.test(t.data)){const e=i.pop();void 0!==e&&n.push({...e,close:t});continue}const s=t.data.match(Ao);null!==s&&i.push({kind:s[1],expr:s[2],open:t,parent:e,seq:o++});continue}1===t.nodeType&&s(t)}for(const e of i)t(e)};return s(e),n.sort((e,t)=>e.seq-t.seq)}(t,e=>{Wo(`virtual:unclosed:${s}:${e.kind}`,`\x3c!-- dm ${e.kind}: ${e.expr} --\x3e in ${s} has no matching \x3c!-- /dm --\x3e, so the block was skipped. Every virtual binding needs a closer.`)});for(const e of u)"each"===e.kind&&y(e,u);const p=[];Io(t,e=>{if(Bo.has(e))return c++,!1;const t=e.getAttribute(Eo),n=function(e){const t=[];for(const n of[...e.attributes]){if(n.name===jo||n.name===Eo)continue;const e=Lt(n.name);null!==e&&t.push({name:n.name,value:n.value.trim(),kind:e.kind,arg:e.arg,handler:e.handler})}return t}(e);return null===t&&0===n.length||(p.push({el:e,each:t,claims:n}),null===t)}),c>0&&Wo(`double:${s}`,`applyBindings ran again over ${s}, where ${c} element(s) were already bound. Those were skipped rather than bound twice; the handle returned owns only what this call created. Dispose the first handle before re-applying.`);for(const{el:e}of p)Bo.add(e),e.setAttribute(jo,""),l.push(e);!function(e,t){const n=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT,null);let o;for(;o=n.nextNode();)if(zo.test(o.data)&&!Oo(o,e))return void Wo(`interp:${t}`,`${t} contains "${o.data.trim().slice(0,40)}" - applyBindings does not interpolate {{ }} in already-rendered DOM, and leaves it as it found it. Use data-bind-text="expr", which the server can render alongside the text, or compile() if the markup should come from a template.`)}(t,s);let m=0;for(const e of p){null!==e.each&&v(e.el,e.each);for(const t of e.claims)g(e.el,t)}for(const e of u)b(e);function f(e,t,n){if(!1===t.expression)return{ast:null,evaluate:null,deps:new Set};const o={template:`${s} ${n}`,methodCalls:!0===t.methodCalls},i=Qe(e,o);return null===i?null:{ast:i,evaluate:tt(e,o),deps:!1===t.tracks?new Set:nt(i)}}function g(e,t){const{handler:n,kind:s,arg:r,value:l,name:d}=t,c=f(l,n,d);if(null===c)return;const u={id:`apply${m++}_${s}`,kind:s,arg:r,expr:l,ast:c.ast,evaluate:c.evaluate,deps:c.deps,nodes:[e]};h.bindings.push(u),"function"==typeof n.attach&&n.attach({binding:u,node:e,controller:h}),"function"==typeof n.detach&&a.push(()=>n.detach({binding:u,node:e,controller:h})),!0!==n.region?!1!==n.tracks&&k(()=>n.update({binding:u,nodes:[e],context:i,render:o,controller:h})):"if"===s?function(e,t){const n=document.createComment(`dm:if ${t.expr}`);e.parentNode?.insertBefore(n,e),k(()=>{const o=mt(t.evaluate(i));return o&&null===e.parentNode?n.parentNode?.insertBefore(e,n.nextSibling):o||null===e.parentNode||e.parentNode.removeChild(e),!0}),a.push(()=>{null===e.parentNode&&n.parentNode?.insertBefore(e,n.nextSibling),n.parentNode?.removeChild(n)})}(e,u):Wo(`region:${s}`,`"${d}" is a region binding, which needs a compiled template body. applyBindings has none - the markup is the page. Use compile() for ${s}, or data-if / data-each, which are implemented here directly.`)}function v(e,t){const n=So.exec(t);if(null===n||""===n[1].trim())return void Wo(`each:unkeyed:${s}`,`${Eo}="${t}" on ${Ho(e)} needs a key: write ${Eo}="${t.trim()} key=id", naming whichever property identifies an item. Without one there is nothing to reconcile against.`);const r=n[1].trim(),l=n[2],d=f(r,{expression:!0,tracks:!0},Eo);if(null===d)return;const c=e.innerHTML;e.replaceChildren();const u=document.createComment("dm:each"),p=document.createComment("/dm:each");e.append(u,p);const g={id:`apply${m++}_each`,kind:"each",expr:r,keyPath:l,body:c,ast:d.ast,evaluate:d.evaluate,deps:d.deps,factoryBox:{value:null,options:{template:s}},nodes:[{open:u,close:p}]};h.bindings.push(g);const v=xt("each");k(()=>v.update({binding:g,nodes:g.nodes,context:i,render:o,controller:h})),a.push(()=>{bn({open:u},[],ko(g,o),l,i,s),e.replaceChildren()})}function y(e,t){const n=document.createElement("div");for(const t of cn(e.open,e.close))n.appendChild(t);e.body=n.innerHTML;for(const o of t)o!==e&&n.contains(o.open)&&(o.consumed=!0,Wo(`virtual:nested:${s}:${o.kind}`,`\x3c!-- dm ${o.kind}: ${o.expr} --\x3e is inside a virtual list's body, which is compiled as a template - virtual bindings are not read there. Use {{#${o.kind}}} inside the body, or data-if on an element.`))}function b(e){!0!==e.consumed&&("if"===e.kind?function(e){const t=f(e.expr,{expression:!0,tracks:!0},"\x3c!-- dm if --\x3e");if(null===t)return;const n={id:`apply${m++}_if`,kind:"if",expr:e.expr,ast:t.ast,evaluate:t.evaluate,deps:t.deps,nodes:[{open:e.open,close:e.close}]};h.bindings.push(n);let o=null;const s=()=>{null!==o&&(e.close.parentNode?.insertBefore(o,e.close),o=null)};k(()=>{if(mt(n.evaluate(i)))s();else if(null===o){o=document.createDocumentFragment();for(const t of cn(e.open,e.close))o.appendChild(t)}return!0}),a.push(s)}(e):"each"===e.kind?function(e){const t=e.expr.match(So);if(null===t||""===t[1].trim())return void Wo(`virtual:each:unkeyed:${s}`,`\x3c!-- dm each: ${e.expr} --\x3e needs a key: write \x3c!-- dm each: ${e.expr.trim()} key=id --\x3e, naming whichever property identifies an item. Without one there is nothing to reconcile against.`);const n=t[1].trim(),r=t[2],l=f(n,{expression:!0,tracks:!0},"\x3c!-- dm each --\x3e");if(null===l)return;const d={id:`apply${m++}_each`,kind:"each",expr:n,keyPath:r,body:e.body,ast:l.ast,evaluate:l.evaluate,deps:l.deps,factoryBox:{value:null,options:{template:s}},nodes:[{open:e.open,close:e.close}]};h.bindings.push(d);const c=xt("each");k(()=>c.update({binding:d,nodes:d.nodes,context:i,render:o,controller:h})),a.push(()=>{bn({open:e.open,close:e.close},[],ko(d,o),r,i,s)})}(e):"text"===e.kind?function(e){const t=f(e.expr,{expression:!0,tracks:!0},"\x3c!-- dm text --\x3e");if(null===t)return;for(const t of cn(e.open,e.close))t.parentNode?.removeChild(t);const n=document.createTextNode("");e.close.parentNode?.insertBefore(n,e.close);const o={id:`apply${m++}_text`,kind:"text",expr:e.expr,ast:t.ast,evaluate:t.evaluate,deps:t.deps,nodes:[n]};h.bindings.push(o),k(()=>{const e=o.evaluate(i);return n.data=null==e?"":String(e),!0}),a.push(()=>n.parentNode?.removeChild(n))}(e):Wo(`virtual:kind:${e.kind}`,`\x3c!-- dm ${e.kind}: … --\x3e is not a virtual binding. Supported: if, each, text. Anything else needs an element to bind to.`))}function k(e){r.push(ce(e,{label:`${s}:${r.length}`}))}return{get bindings(){return h.bindings.length},context:()=>i,update(e){if(!d){void 0!==e&&(i=Ee(e));for(const e of r)e.recompute()}},dispose(){if(!d){d=!0;for(const e of r)e.dispose();r.length=0;for(const e of a)try{e()}catch(e){console.warn(`${Co} applyBindings teardown threw:`,e)}a.length=0;for(const e of l)Bo.delete(e),e.removeAttribute(jo);l.length=0}}}}function Oo(e,t){for(let n=e.parentNode;n;n=n.parentNode){if(1===n.nodeType&&n.hasAttribute(Eo))return!0;if(n===t)return!1}return!1}const No=(e,t)=>c.isEqual(e,t);class Vo{constructor(e,t={},n={}){this._schema=e,this._initialData={},this._bindings=new Map,this._changeCallbacks=new Set,this._fieldCallbacks=new Map,this._fields=new Map,this._trackedView=null,this._persistKey=n.persist||null,this._autoSave=!1!==n.autoSave;for(const n in e){const o=e[n],s=void 0!==o.default?o.default:null,i=void 0!==t[n]?t[n]:s;this._fields.set(n,ke(i,{equals:No})),this._initialData[n]=i}this._persistKey&&this._loadFromStorage()}get(e){if(e){const t=this._fields.get(e);return t?t.value:void 0}const t={};for(const[e,n]of this._fields)t[e]=n.value;return t}_field(e){let t=this._fields.get(e);return t||(t=ke(null,{equals:No}),this._fields.set(e,t)),t}_snapshot(){const e={};for(const[t,n]of this._fields)e[t]=n.peek();return e}tracked(){if(!this._trackedView){const e=this;this._trackedView=new Proxy({},{get(t,n){if("string"!=typeof n)return;const o=e._fields.get(n);return o?o.value:void 0},set:(t,n,o)=>("string"==typeof n&&e._setField(n,o),!0),has(t,n){if("string"!=typeof n)return!1;const o=e._fields.get(n);return!!o&&(o.value,!0)},ownKeys:()=>[...e._fields.keys()],getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0})})}return this._trackedView}set(e,t){if("object"==typeof e)for(const t in e)this._setField(t,e[t]);else this._setField(e,t);return this}_setField(e,t){const n=this._field(e),o=n.peek();if(this._schema[e]){const n=this._validateField(e,t);if(!n.valid)throw new Error(`Validation failed for ${e}: ${n.error}`)}const s=!No(o,t);n.value=t,s&&(this._notifyChange(e,t,o),this._updateBindings(e,t),this._persistKey&&this._autoSave&&this._saveToStorage())}_validateField(e,t){const n=this._schema[e];if(n.required&&(null==t||""===t))return{valid:!1,error:"Required field is empty"};if(null!=t&&n.type){const e=Ro.types[n.type];if(e&&!e(t))return{valid:!1,error:`Expected type ${n.type}`}}if(void 0!==n.min&&"number"==typeof t&&t<n.min)return{valid:!1,error:`Value must be at least ${n.min}`};if(void 0!==n.max&&"number"==typeof t&&t>n.max)return{valid:!1,error:`Value must be at most ${n.max}`};if(void 0!==n.minLength&&"string"==typeof t&&t.length<n.minLength)return{valid:!1,error:`Length must be at least ${n.minLength}`};if(void 0!==n.maxLength&&"string"==typeof t&&t.length>n.maxLength)return{valid:!1,error:`Length must be at most ${n.maxLength}`};if(n.pattern&&"string"==typeof t&&!n.pattern.test(t))return{valid:!1,error:"Value does not match pattern"};if(n.validate&&"function"==typeof n.validate){const e=n.validate(t);if(!1===e)return{valid:!1,error:"Custom validation failed"};if("string"==typeof e)return{valid:!1,error:e}}return{valid:!0}}validate(){const e=[],t=this._snapshot();for(const n in this._schema){const o=this._validateField(n,t[n]);o.valid||e.push({field:n,error:o.error})}return{valid:0===e.length,errors:e}}toJSON(){return he(()=>this._snapshot())}onChange(e,t){if("string"==typeof e){if("function"!=typeof t)throw new TypeError(`Model.onChange('${e}', callback) requires a callback function`);const n=e,o=e=>{e.field===n&&t(e)};return this._changeCallbacks.add(o),()=>this._changeCallbacks.delete(o)}if("function"!=typeof e)throw new TypeError("Model.onChange expects a callback, or (field, callback)");return this._changeCallbacks.add(e),()=>this._changeCallbacks.delete(e)}onFieldChange(e,t){return this._fieldCallbacks.has(e)||this._fieldCallbacks.set(e,new Set),this._fieldCallbacks.get(e).add(t),()=>this._fieldCallbacks.get(e)?.delete(t)}_notifyChange(e,t,n){for(const o of this._changeCallbacks)o({field:e,newValue:t,oldValue:n,model:this});if(this._fieldCallbacks.has(e))for(const o of this._fieldCallbacks.get(e))o(t,n,this)}_updateBindings(e,t){if(this._bindings.has(e))for(const n of this._bindings.get(e))n.update(t)}_addBinding(e,t){this._bindings.has(e)||this._bindings.set(e,new Set),this._bindings.get(e).add(t)}_removeBinding(e,t){this._bindings.has(e)&&this._bindings.get(e).delete(t)}reset(e=!1){for(const e in this._initialData)this.set(e,c.cloneDeep(this._initialData[e]));return e&&this._persistKey&&this.clearStorage(),this}destroy(e=!1){e&&this._persistKey&&this.clearStorage(),this._changeCallbacks.clear(),this._fieldCallbacks.clear(),this._bindings.clear(),this._fields.clear(),this._trackedView=null}save(){return this._saveToStorage()}load(){return this._loadFromStorage()}clearStorage(){return!!this._persistKey&&J.remove(`model:${this._persistKey}`)}getPersistKey(){return this._persistKey}isPersisted(){return null!==this._persistKey}_saveToStorage(){if(!this._persistKey)return!1;try{return J.set(`model:${this._persistKey}`,this._snapshot())}catch(e){return console.warn("Domma Model: Failed to save to storage",e),!1}}_loadFromStorage(){if(!this._persistKey)return!1;try{const e=J.get(`model:${this._persistKey}`);if(e&&"object"==typeof e){for(const t in e)void 0!==this._schema[t]&&(this._field(t).value=e[t]);return!0}return!1}catch(e){return console.warn("Domma Model: Failed to load from storage",e),!1}}}class Po{constructor(e,t,n,o={}){this.model=e,this.field=t,this.element=n,this.options=o,this.format=o.format||(e=>e),this.parse=o.parse||(e=>e),this.twoWay=o.twoWay||!1,this._eventHandler=null,this.update(e.get(t)),this.twoWay&&this._setupTwoWay()}update(e){const t=this.format(e),n=this.element;"INPUT"===n.tagName||"TEXTAREA"===n.tagName?"checkbox"===n.type?n.checked=Boolean(t):"radio"===n.type?n.checked=n.value===String(t):n.value=null!=t?t:"":"SELECT"===n.tagName?n.value=t:n.textContent=null!=t?t:""}_setupTwoWay(){const e=this.element,t=this._getEventType();this._eventHandler=t=>{let n;n="checkbox"===e.type?e.checked:"number"===e.type||"range"===e.type?""===e.value?null:Number(e.value):e.value;try{this.model.set(this.field,this.parse(n))}catch(e){console.warn("Binding validation error:",e.message)}},e.addEventListener(t,this._eventHandler)}_getEventType(){const e=this.element;return"SELECT"===e.tagName||"checkbox"===e.type||"radio"===e.type?"change":"input"}destroy(){if(this._eventHandler){const e=this._getEventType();this.element.removeEventListener(e,this._eventHandler)}this.model._removeBinding(this.field,this)}}const Ro={_events:new Map,subscribe(e,t){return this._events.has(e)||this._events.set(e,new Set),this._events.get(e).add(t),()=>this.unsubscribe(e,t)},on(e,t){return this.subscribe(e,t)},unsubscribe(e,t){this._events.has(e)&&this._events.get(e).delete(t)},off(e,t){this.unsubscribe(e,t)},publish(e,t){if(this._events.has(e))for(const n of this._events.get(e))n(t)},emit(e,t){this.publish(e,t)},once(e,t){const n=o=>{this.unsubscribe(e,n),t(o)};return this.subscribe(e,n)},clear(e){e?this._events.delete(e):this._events.clear()},create:(e,t={},n={})=>new Vo(e,t,n),extend(...e){const t={};for(const n of e)for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]&&c.isPlainObject(t[e])?t[e]=c.merge(c.cloneDeep(t[e]),c.cloneDeep(n[e])):t[e]=c.cloneDeep(n[e]));return t},pick(e,t){const n={};for(const o of t)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=c.cloneDeep(e[o]));return n},omit(e,t){const n=c.cloneDeep(e);for(const e of t)delete n[e];return n},observable:ke,observableArray:function(e=[],t={}){const n=new ie,o=ye();let s=Array.isArray(e)?e.slice():[];const i=be(t,e=>{n.trigger(),o.notify(e)}),r=()=>i.announce(s),a=e=>{const t=Array.isArray(e)?e.slice():[],n=i.changed(s,t);s=t,n&&r()},l={get value(){return n.track(),s},set value(e){a(e)},get length(){return n.track(),s.length},peek:()=>s,set:e=>a(e),remove:e=>{const t="function"==typeof e?e:t=>t===e;for(let e=s.length-1;e>=0;e--)t(s[e],e)&&s.splice(e,1);return r(),l},removeAll:()=>(s.length=0,r(),l),indexOf:e=>(n.track(),s.indexOf(e)),replace:(e,t)=>{const n=s.indexOf(e);return-1!==n&&(s[n]=t),r(),l},destroy:e=>{const t="function"==typeof e?e:t=>t===e;let n=0,o=0;for(let e=0;e<s.length;e++)t(s[e],e)&&(null!==s[e]&&"object"==typeof s[e]?(s[e]._destroy=!0,n++):o++);return o>0&&console.warn(`${ve} destroy: ${o} matching item(s) are not objects and cannot carry a _destroy mark. Use remove() for an array of primitives.`),(n>0||0===o)&&r(),l},destroyAll:()=>l.destroy(()=>!0),subscribe:e=>o.add(e),extend:e=>(i.extend(e),l)};i.attach(l);for(const e of _e)l[e]=(...t)=>{const n=Array.prototype[e].apply(s,t);return r(),n};return l},computed(e,t={}){const n=de(e,{label:t.label,onNotify:t.onChange||null});return{get value(){return n.get()},set value(e){n.write(e)},get:()=>n.get(),set:e=>n.write(e),peek:()=>he(()=>n.get()),dispose:()=>n.dispose(),_computation:n}},effect(e,t={}){const n=ce(e,{label:t.label});return()=>n.dispose()},untracked:e=>he(e),flush(){oe=!1,le()},types:{string:e=>"string"==typeof e,number:e=>"number"==typeof e&&!Number.isNaN(e),boolean:e=>"boolean"==typeof e,array:e=>Array.isArray(e),object:e=>null!==e&&"object"==typeof e&&!Array.isArray(e),date:e=>e instanceof Date&&!isNaN(e.getTime()),any:()=>!0},bind(e,t,n,o={}){const s="string"==typeof n?document.querySelectorAll(n):[n],i=[];for(const n of s){const s=new Po(e,t,n,o);e._addBinding(t,s),i.push(s)}return()=>{for(const e of i)e.destroy()}},applyBindings(e,t,n={}){const o=function(e){if("string"==typeof e)return document.querySelector(e);if(e&&1===e.nodeType)return e;if(e&&"object"==typeof e){const t=e[0]||(Array.isArray(e.elements)?e.elements[0]:null);if(t&&1===t.nodeType)return t}return null}(t);if(!o)throw new TypeError(`M.applyBindings: no element found for ${"string"==typeof t?`selector "${t}"`:String(t)}`);const{methods:s,...i}=n;return Do(function(e,t){return G(e instanceof Vo?e.tracked():e,{fallback:t})}(e,s),o,{render:(e,t)=>c.render(e,t),...i})},registerBinding:(e,t)=>Mt(e,t),unregisterBinding:e=>function(e){return kt.delete(e)}(e),registerExtender:(e,t)=>fe(e,t),unregisterExtender:e=>function(e){return!me.has(e)&&pe.delete(e)}(e),registerHelper:(e,t)=>ot(e,t),unregisterHelper:e=>function(e){return Be.delete(e)}(e),_stores:new Map,store(e,t={}){if(!this._stores.has(e)){const n={state:{...t},listeners:new Set,getState(){return{...this.state}},setState(e){const t={...this.state};this.state={...this.state,...e};for(const e of this.listeners)e(this.state,t)},subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)},reset(e){this.state=e?{...e}:{...t};for(const e of this.listeners)e(this.state,{})}};this._stores.set(e,n)}return this._stores.get(e)},getStore(e){return this._stores.get(e)},removeStore(e){this._stores.delete(e)}};class Fo{static defaults={layout:"stacked",columns:2,labelPosition:"top",showLabels:!0,showHelperText:!0,showHints:!0,validationMode:"blur",cssFramework:"domma",className:"domma-form",fieldClassName:"domma-form-field",labelClassName:"form-label",inputClassName:"form-input",errorClassName:"form-error",helperClassName:"form-helper-text",hintClassName:"form-hint",cardWrapper:!1};static inputTypes={string:"text",email:"email",password:"password",number:"number",integer:"number",float:"number",boolean:"checkbox",date:"date",datetime:"datetime-local",time:"time",url:"url",tel:"tel",color:"color",range:"range",file:"file",hidden:"hidden",signature:"signature"};constructor(e,t={},n={}){this.schema=e,this.data={...t},this.options={...Fo.defaults,...n},this.model=null,this.errors={},this.touched=new Set,this.utils=window.Domma?.utils||c,this.models=window.Domma?.models||Ro,e&&"object"==typeof e&&(this.model=this.models.create(e,t,{persist:n.persist,autoSave:n.autoSave}))}render(){if(!this.schema)throw new Error("Schema is required to render form");return this._buildForm()}renderTo(e){const t="string"==typeof e?document.querySelector(e):e;if(!t)throw new Error(`Form container not found: ${e}`);return t.innerHTML=this.render(),this.formElement=t.querySelector("form"),this._bindEvents(t),this._initTooltips(t),t}_buildForm(){const{className:e,layout:t,columns:n,cardWrapper:o}=this.options;let s=e;if("grid"===t){s+=` grid ${3===n?"grid-cols-3":"grid-cols-2"} gap-4`}else"inline"===t&&(s+=" domma-form-inline");let i="";if(o&&(i+='<div class="card"><div class="card-body">'),i+=`<form class="${s}" novalidate>`,this.options.sections&&Array.isArray(this.options.sections))for(const e of this.options.sections)i+=this._buildSection(e);else for(const e in this.schema)i+=this._buildField(e,this.schema[e]);if(!1!==this.options.showSubmitButton){const e=this.options.submitText||"Submit",t=this.options.resetText,n=this.options.buttonAlignment||"right";i+=`<div class="form-group form-buttons mt-4 ${"left"===n?"text-left":"center"===n?"text-center":"text-right"}">`,t&&(i+=`<button type="button" class="btn btn-secondary mr-2" data-action="reset">${this.utils.escapeHtml(t)}</button>`),i+=`<button type="submit" class="btn btn-primary">${this.utils.escapeHtml(e)}</button>`,i+="</div>"}return i+="</form>",o&&(i+="</div></div>"),i}_buildSection(e){let t="";e.title&&(t+='<fieldset class="domma-form-section">',t+=`<legend class="domma-form-section-title">${this.utils.escapeHtml(e.title)}</legend>`);t+=`<div class="${"grid"===e.layout?`grid grid-cols-${e.columns||2}`:"domma-form-section-content"}">`;for(const n of e.fields||[])this.schema[n]&&(t+=this._buildField(n,this.schema[n]));return t+="</div>",e.title&&(t+="</fieldset>"),t}_buildField(e,t){const{fieldClassName:n,showLabels:o,showHelperText:s,showHints:i,labelPosition:r}=this.options,a=t.formConfig||{},l=t.type||"string",d=t.label||this.utils.capitalize(e),c=this.data[e]||t.default||"",h=t.required||!1,u=a.disabled||t.readonly||!1,p=a.placeholder||"",m=a.hint||"",f=a.helperText||"",g=a.tooltip||"",v=a.span||1;let y="";if("grid"===this.options.layout&&v>1){const e=this.options.columns||2;2===v?y=" col-span-2":3===v&&3===e?y=" col-span-3":v>=e&&(y=3===e?" col-span-3":" col-span-2")}let b=`<div class="${n}${y}" data-field="${e}">`;if(o&&d&&"hidden"!==l&&"boolean"!==l&&"checkbox"!==l){const t=this.options.labelClassName,n=h?' <span class="text-danger">*</span>':"",o=g?` data-tooltip="${this.utils.escapeHtml(g)}"`:"",s=g?" has-tooltip":"";b+=`<label for="field-${this.utils.escapeHtml(e)}" class="${t}${s}"${o}>`,b+=`${this.utils.escapeHtml(d)}${n}`,g&&(b+=' <span class="tooltip-icon" data-icon="help-circle" style="display: inline-block; vertical-align: middle; opacity: 0.6; cursor: help;"></span>'),i&&m&&(b+=` <small class="${this.options.hintClassName}">${this.utils.escapeHtml(m)}</small>`),b+="</label>"}return b+=this._buildInput(e,t,{type:l,value:c,required:h,disabled:u,placeholder:p}),s&&f&&(b+=`<small class="${this.options.helperClassName}">${f}</small>`),b+=`<div class="${this.options.errorClassName}" data-error-for="${e}" style="display: none;"></div>`,b+="</div>",b}_buildInput(e,t,n){const{type:o,value:s,required:i,disabled:r,placeholder:a}=n,l=t.formConfig||{},d=`field-${e}`,c={id:d,name:e,class:this.options.inputClassName,...i&&{required:!0},...r&&{disabled:!0},...a&&{placeholder:a},...void 0!==t.min&&{min:t.min},...void 0!==t.max&&{max:t.max},...t.pattern&&{pattern:t.pattern},...l.autocomplete&&{autocomplete:l.autocomplete}},h=Object.entries(c).map(([e,t])=>!0===t?e:`${e}="${t}"`).join(" ");switch(o){case"select":return this._buildSelect(e,t,c,s);case"multiselect":return c.multiple=!0,this._buildSelect(e,t,c,s);case"textarea":return`<textarea ${h} rows="${l.rows||3}">${this.utils.escapeHtml(s)}</textarea>`;case"radio":return this._buildRadioGroup(e,t,c,s);case"checkbox-group":return this._buildCheckboxGroup(e,t,c,s);case"chooser":return this._buildChooser(e,t,c,s);case"checkbox":case"boolean":const n=s?"checked":"",i=t.label||this.utils.capitalize(e),r=t.required?' <span class="text-danger">*</span>':"",a=l.hint?` <small class="form-text text-muted">${l.hint}</small>`:"";return`<div class="form-check">\n <input type="checkbox" class="form-check-input" ${h} ${n}>\n <label class="form-check-label" for="${c.id}">${i}${r}</label>\n ${a}\n </div>`;case"file":return`<input type="file" ${h} accept="${l.accept||""}" ${l.multiple?"multiple":""}>`;case"signature":return`<div class="domma-signature-field" id="${d}" data-signature-field="${e}"></div>`;default:const u=`<input type="${Fo.inputTypes[o]||"text"}" ${h} value="${this.utils.escapeHtml(s)}">`,p=this._buildAddon(l.prefix,"left"),m=this._buildAddon(l.suffix,"right");if(!p&&!m)return u;return`<div class="${["input-group-icon",p&&"has-addon-left",m&&"has-addon-right"].filter(Boolean).join(" ")}">${p}${u}${m}</div>`}}_buildAddon(e,t){if(!e||"object"!=typeof e)return"";const n=`input-group-addon input-group-addon-${t}`;let o="";return e.icon&&/^[a-z0-9-]+$/i.test(e.icon)?o=`<span data-icon="${e.icon}"></span>`:void 0!==e.text&&null!==e.text?o=this.utils.escapeHtml(String(e.text)):"string"==typeof e.html&&(o=e.html),o?`<span class="${n}">${o}</span>`:""}_buildSelect(e,t,n,o){let s=`<select ${Object.entries(n).map(([e,t])=>!0===t?e:`${e}="${t}"`).join(" ")}>`;t.required||(s+='<option value="">-- Select --</option>');const i=t.options||[],r=Array.isArray(o)?o:[o];for(const e of i)if("string"==typeof e){s+=`<option value="${e}" ${r.includes(e)?"selected":""}>${this.utils.capitalize(e)}</option>`}else if("object"==typeof e){const t=r.includes(e.value)?"selected":"";s+=`<option value="${e.value}" ${t}>${e.label}</option>`}return s+="</select>",s}_buildRadioGroup(e,t,n,o){const s=t.options||[];let i='<div class="domma-radio-group" role="radiogroup">';for(const t of s){const s="string"==typeof t?t:t.value,r="string"==typeof t?this.utils.capitalize(t):t.label,a=`${n.id}-${s}`;i+=`\n <label class="domma-radio-option" for="${a}">\n <input type="radio" class="form-check-input" id="${a}" name="${e}" value="${s}" ${s===o?"checked":""} ${n.disabled?"disabled":""}>\n <span class="form-check-label">${r}</span>\n </label>\n `}return i+="</div>",i}_buildCheckboxGroup(e,t,n,o){const s=t.options||[],i=Array.isArray(o)?o:[];let r='<div class="domma-checkbox-group">';for(const t of s){const o="string"==typeof t?t:t.value,s="string"==typeof t?this.utils.capitalize(t):t.label,a=`${n.id}-${o}`;r+=`\n <label class="domma-checkbox-option" for="${a}">\n <input type="checkbox" class="form-check-input" id="${a}" name="${e}[]" value="${o}" ${i.includes(o)?"checked":""} ${n.disabled?"disabled":""}>\n <span class="form-check-label">${s}</span>\n </label>\n `}return r+="</div>",r}_buildChooser(e,t,n,o){const s={variant:t.variant||"card",multiple:!!t.multiple,density:t.density||"comfortable",columns:t.columns||3,accent:t.accent||"primary",accentStyle:t.accentStyle||"border",glow:!!t.glow,glowColour:t.glowColour||null,shadow:t.shadow||"none",shadowColour:t.shadowColour||null,options:t.options||[],value:void 0!==o?o:t.multiple?[]:null,name:e,required:!!t.required},i=JSON.stringify(s).replace(/"/g,"&quot;");return`<div class="domma-chooser-field" id="${n.id}" data-chooser-field="${e}" data-chooser-config="${i}"></div>`}_bindEvents(e){e.addEventListener("submit",e=>{e.preventDefault(),this.handleSubmit()}),e.addEventListener("blur",e=>{e.target.matches("input, select, textarea")&&(this.validateField(e.target.name),this.touched.add(e.target.name))},!0),e.addEventListener("change",e=>{if(e.target.matches("input, select, textarea")&&this.model){const t=this._getFieldValue(e.target);try{this.model.set(e.target.name,t)}catch(t){this.setFieldError(e.target.name,t.message)}}}),e.addEventListener("click",e=>{e.target.matches('[data-action="reset"]')&&(e.preventDefault(),this.reset())}),this._initSignatureFields(e),this._initChooserFields(e)}_initChooserFields(e){this._choosers||(this._choosers={});const t=e.querySelectorAll("[data-chooser-field]");if(!t.length)return;const n="function"==typeof Y?.chooser?Y.chooser.bind(Y):window.Domma?.elements?.chooser?.bind(window.Domma.elements);n&&t.forEach(e=>{const t=JSON.parse((e.getAttribute("data-chooser-config")||"{}").replace(/&quot;/g,'"')),o=e.getAttribute("data-chooser-field"),s=n(e,{...t,onChange:e=>{if(this.model)try{this.model.set(o,e)}catch(e){this.setFieldError(o,e.message)}else this.data[o]=e}});s&&(this._choosers[o]=s)})}_initSignatureFields(e){const t=e.querySelectorAll("[data-signature-field]");t.length&&window.Domma&&"function"==typeof window.Domma.elements?.signature&&t.forEach(e=>{const t=e.dataset.signatureField;window.Domma.elements.signature(e,{name:t,onChange:e=>{this.model&&this.model.set({[t]:e})}})})}_initTooltips(e){if(window.Domma&&window.Domma.icons&&"function"==typeof window.Domma.icons.scan&&window.Domma.icons.scan(e),window.Domma&&window.Domma.elements&&"function"==typeof window.Domma.elements.tooltip){e.querySelectorAll("label[data-tooltip]").forEach(e=>{window.Domma.elements.tooltip(e,{position:"top",trigger:"hover",delay:{show:200,hide:0}})})}}getData(){return this.model?this.model.get():this.data}setData(e){this.data={...this.data,...e},this.model&&this.model.set(e)}validate(){this.errors={};let e=!0;for(const t in this.schema){this.validateField(t)||(e=!1)}return e}validateField(e){const t=this.schema[e];if(!t)return!0;const n=this._getFieldValueByName(e);try{const o=this._validateFieldValue(e,n,t);if(!o.valid)return this.setFieldError(e,o.error),!1;if(this.model&&this.model._validateField){const t=this.model._validateField(e,n);if(!t.valid)return this.setFieldError(e,t.error),!1}return this.clearFieldError(e),!0}catch(t){return this.setFieldError(e,t.message),!1}}setFieldError(e,t){this.errors[e]=t;const n=document.querySelector(`[data-error-for="${e}"]`);n&&(n.textContent=t,n.style.display="block",n.parentElement.classList.add("has-error"))}clearFieldError(e){delete this.errors[e];const t=document.querySelector(`[data-error-for="${e}"]`);t&&(t.textContent="",t.style.display="none",t.parentElement.classList.remove("has-error"))}handleSubmit(){const e=this.validate(),t=this.getData();return e&&this.options.onSubmit?this.options.onSubmit(t,this):!e&&this.options.onValidationError&&this.options.onValidationError(this.errors,this),{isValid:e,data:t,errors:this.errors}}_getFieldValue(e){const{type:t,name:n}=e;if("checkbox"===t){if(n.endsWith("[]")){const e=document.querySelectorAll(`input[name="${n}"]:checked`);return Array.from(e).map(e=>e.value)}return e.checked}if("radio"===t){const e=document.querySelector(`input[name="${n}"]:checked`);return e?e.value:null}return"number"===t||"range"===t?""===e.value?null:Number(e.value):e.value}_getFieldValueByName(e){if(this._choosers&&this._choosers[e])return this._choosers[e].getValue();if(this.formElement){const t=this.formElement.querySelector(`[name="${e}"]`);if(t)return this._getFieldValue(t)}return this.model?this.model.get(e):this.data[e]}_validateFieldValue(e,t,n){const o="chooser"===n.type?null==t||Array.isArray(t)&&0===t.length||""===t:null==t||""===t;if(n.required&&o)return{valid:!1,error:`${n.label||e} is required`};if(o)return{valid:!0};if("email"===n.type&&t){if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t))return{valid:!1,error:"Please enter a valid email address"}}if("number"===n.type&&null!==t){const e=Number(t);if(isNaN(e))return{valid:!1,error:"Please enter a valid number"};if(void 0!==n.min&&e<n.min)return{valid:!1,error:`Value must be at least ${n.min}`};if(void 0!==n.max&&e>n.max)return{valid:!1,error:`Value must be no more than ${n.max}`}}if("string"==typeof t){if(n.minLength&&t.length<n.minLength)return{valid:!1,error:`Must be at least ${n.minLength} characters`};if(n.maxLength&&t.length>n.maxLength)return{valid:!1,error:`Must be no more than ${n.maxLength} characters`}}if(n.pattern&&"string"==typeof t&&!n.pattern.test(t))return{valid:!1,error:n.formConfig?.hint||"Invalid format"};if(n.validate&&"function"==typeof n.validate)try{const e=this.formElement?function(e){const t=new FormData(e),n={};for(const[e,o]of t.entries())n[e]?Array.isArray(n[e])?n[e].push(o):n[e]=[n[e],o]:n[e]=o;return e.querySelectorAll("input").forEach(e=>{"checkbox"!==e.type||e.checked?"checkbox"===e.type&&e.checked&&(n[e.name]="on"===e.value||e.value):n.hasOwnProperty(e.name)||(n[e.name]=!1)}),n}(this.formElement):this.data,o=n.validate(t,e);if(!0!==o)return{valid:!1,error:o||"Validation failed"}}catch(e){return{valid:!1,error:e.message||"Validation error"}}return{valid:!0}}}const qo={create:(e,t={},n={})=>new Fo(e,t,n),render:(e,t,n={},o={})=>new Fo(t,n,o).renderTo(e),wizard(e,t={}){if(!t.schema)throw new Error("Wizard options must include a schema with steps array");const{schema:{steps:n=[]},data:o={},...s}=t,i=`wizard-${Date.now()}`;let r=0,a={...o},l=null;const d="string"==typeof e?document.querySelector(e):e;if(!d)throw new Error(`Wizard target element not found: ${e}`);if(!Array.isArray(n)||0===n.length)throw new Error("Wizard schema must contain a non-empty steps array");function c(e){const t={};return e.querySelectorAll("input, select, textarea").forEach(e=>{const{name:n,type:o,value:s,checked:i}=e;if(n)if("checkbox"===o)if(n.endsWith("[]")){const e=n.slice(0,-2);t[e]||(t[e]=[]),i&&t[e].push(s)}else t[n]=i;else"radio"===o?i&&(t[n]=s):"number"===o||"range"===o?t[n]=""===s?null:Number(s):"SELECT"===e.tagName&&e.hasAttribute("multiple")?t[n]=Array.from(e.selectedOptions).map(e=>e.value).filter(e=>e):t[n]=s}),t}function h(){if(d.innerHTML=function(e){const t=n[e],o=new Fo(t.fields,a,{...s,layout:t.layout||s.layout||"stacked",showSubmitButton:!1}),r=0===e,l=e===n.length-1;return`\n <div id="${i}" class="wizard">\n <div class="wizard-step active card" data-step="${e}">\n <div class="card-header wizard-header">\n <div class="wizard-progress mb-3">\n <div class="wizard-progress-bar" style="width: ${(e+1)/n.length*100}%"></div>\n </div>\n <div class="wizard-step-info">\n <h5 class="wizard-step-title card-title mb-2">${t.title}</h5>\n ${t.description?`<p class="wizard-step-description card-subtitle text-muted mb-2">${t.description}</p>`:""}\n <small class="text-muted">Step ${e+1} of ${n.length}</small>\n </div>\n </div>\n <div class="card-body wizard-content">\n ${o.render()}\n </div>\n <div class="card-footer wizard-nav d-flex justify-content-between">\n <button type="button" class="btn btn-secondary wizard-prev" ${r?'style="visibility: hidden;"':""}>\n ${s.prevText||"Previous"}\n </button>\n <button type="button" class="btn btn-primary wizard-${l?"submit":"next"}">\n ${l?s.finishText||"Finish":s.nextText||"Next"}\n </button>\n </div>\n </div>\n </div>\n `}(r),l=d.querySelector(`#${i}`),!l)return;const e=l.querySelector("form");if(e){new Fo(n[r].fields,a,{...s,showSubmitButton:!1})._bindEvents(e)}const t=l.querySelector(".wizard-prev"),o=l.querySelector(".wizard-next"),u=l.querySelector(".wizard-submit");t&&t.addEventListener("click",e=>{e.preventDefault(),r>0&&(s.onStepChange&&s.onStepChange(r-1,a),r--,h())}),o&&o.addEventListener("click",t=>{t.preventDefault();const o=c(e);Object.assign(a,o);const i=new Fo(n[r].fields,a,{...s,showSubmitButton:!1});i.formElement=e,i.setData(a);const l=i.validate();s.onValidation&&s.onValidation(l,i.errors||[],r),l&&r<n.length-1&&(s.onStepChange&&s.onStepChange(r+1,a),r++,h())}),u&&u.addEventListener("click",async t=>{t.preventDefault();const o=c(e);Object.assign(a,o);const i=new Fo(n[r].fields,a,{...s,showSubmitButton:!1});i.formElement=e,i.setData(a);const l=i.validate();if(s.onValidation&&s.onValidation(l,i.errors||[],r),l&&s.onSubmit)try{await s.onSubmit(a,i)}catch(e){s.onError&&s.onError(e,a,i)}})}return n.forEach((e,t)=>{if(e.title||(e.title=`Step ${t+1}`),!e.fields)throw new Error(`Step ${t} is missing fields array`)}),h(),{nextStep:()=>{r<n.length-1&&(s.onStepChange&&s.onStepChange(r+1,a),r++,h())},prevStep:()=>{r>0&&(s.onStepChange&&s.onStepChange(r-1,a),r--,h())},goToStep:e=>{e>=0&&e<n.length&&(s.onStepChange&&s.onStepChange(e,a),r=e,h())},getCurrentStep:()=>r,getStepData:()=>({...a}),setStepData:e=>{Object.assign(a,e),h()},validate:()=>{const e=l?.querySelector("form");if(e){const t=new Fo(n[r].fields,a,{...s,showSubmitButton:!1});return t.formElement=e,t.setData(a),t.validate()}return!0},getElement:()=>l}},modal(e,t={},n={}){const o=`form-${Date.now()}`;let s=null;const i=new Fo(e,t,{...n,showSubmitButton:!1,onSubmit:async(e,t)=>{if(n.onSave)try{await n.onSave(e,t),!1!==n.closeOnSave&&s&&s.close()}catch(o){n.onError&&n.onError(o,e,t)}}}),r=`\n <div class="modal" id="modal-${o}" style="display: none;">\n <div class="modal-header">\n <h3 class="modal-title">${n.title||"Form"}</h3>\n <button type="button" class="modal-close" data-action="close">&times;</button>\n </div>\n <div class="modal-body">\n ${i.render()}\n </div>\n <div class="modal-footer">\n <button type="button" class="btn btn-secondary" data-action="close">Cancel</button>\n <button type="button" class="btn btn-primary" data-action="save">${n.saveText||"Save"}</button>\n </div>\n </div>\n `,a=document.createElement("div");a.className="modal-backdrop",a.style.display="none";const l=document.createElement("div");l.innerHTML=r;const d=l.firstElementChild;return document.body.appendChild(a),document.body.appendChild(d),s={open(){a.style.display="block",d.style.display="block",setTimeout(()=>{a.classList.add("active"),d.classList.add("active")},10);const e=d.querySelector("form");e&&i._bindEvents(e),d.querySelectorAll('[data-action="close"]').forEach(e=>{e.addEventListener("click",()=>this.close())}),d.querySelector('[data-action="save"]').addEventListener("click",()=>{const e=d.querySelector("form");if(e){const t=new Event("submit",{cancelable:!0});e.dispatchEvent(t)}}),a.addEventListener("click",e=>{e.target===a&&this.close()})},close(){a.classList.remove("active"),d.classList.remove("active"),setTimeout(()=>{a.style.display="none",d.style.display="none",document.body.removeChild(a),document.body.removeChild(d)},300)},isOpen:()=>"none"!==d.style.display},s},crud(e){if(!e.schema)throw new Error("CRUD config must include a schema");if(!e.endpoint)throw new Error("CRUD config must include an API endpoint");const{schema:t,endpoint:n,tableSelector:o,title:s="Manage Items",primaryKey:i="id",displayField:r="name",headers:a={},onError:l=e=>console.error("CRUD Error:",e),onSuccess:d=e=>console.log("CRUD Success:",e)}=e;let h=null,u=[];return{async init(){await this.loadData(),this.createTable(),this.bindEvents()},async loadData(){try{window.Domma?.auth?.getApiUrl?.();const e=window.Domma?.auth?.token,t=e?{Authorization:`Bearer ${e}`}:{},o=await window.Domma.http.get(n,{headers:{...a,...t}});if(!o.success)throw new Error(o.message||"Failed to load data");u=o.data||[]}catch(e){throw l(e),e}},createTable(){if(!o)return;const e=Object.entries(t).map(([e,t])=>({key:e,title:t.label||(window.Domma?.utils||c).capitalize(e),sortable:!0,render:t.tableRender}));e.push({key:"actions",title:"Actions",sortable:!1,render:(e,t)=>{const n=window.Domma.icons.html("edit",{size:16,class:"inline-icon",colour:"var(--dm-info-light, #a5d8ff)",attrs:{style:"margin-right: 4px;"}}),o=window.Domma.icons.html("trash",{size:16,class:"inline-icon",colour:"var(--dm-danger-light, #ffacac)",attrs:{style:"margin-right: 4px;"}});return`\n <div class="btn-group btn-group-sm">\n <button class="btn btn-primary crud-edit-btn" data-id="${t[i]}">\n ${n}\n Edit\n </button>\n <button class="btn btn-danger crud-delete-btn" data-id="${t[i]}">\n ${o}\n Delete\n </button>\n </div>\n `}}),h=window.Domma.tables.create(o,{data:u,columns:e,pagination:!0,pageSize:25,striped:!0,selectable:!0,selectionMode:"multiple",exportPanel:!0,exportOptions:["text","csv","excel","json"],columnToggle:!0,regexSearch:!0,persistSettings:!0,storageKey:`domma-crud-${s.toLowerCase().replace(/\s+/g,"-")}`}),this.initializeTableIcons()},initializeTableIcons(){setTimeout(()=>{document.querySelectorAll("[data-icon]").forEach(e=>{const t=e.getAttribute("data-icon");if(window.Domma&&window.Domma.icons&&window.Domma.icons.render){const n=window.Domma.icons.render(t,{size:16,class:"inline-icon"});n&&(e.innerHTML="",e.appendChild(n))}})},100)},bindEvents(){const e=document.querySelector(".crud-add-btn");e&&e.addEventListener("click",()=>this.create()),document.addEventListener("click",e=>{if(e.target.matches(".crud-edit-btn")){const t=e.target.getAttribute("data-id");this.edit(t)}}),document.addEventListener("click",e=>{if(e.target.matches(".crud-delete-btn")){const t=e.target.getAttribute("data-id");this.delete(t)}});const t=document.querySelector(".crud-refresh-btn");t&&t.addEventListener("click",()=>this.refresh())},async create(){qo.modal(t,{},{title:`Create New ${s.slice(7)}`,size:"xl",saveText:"Create",showSubmitButton:!1,onSave:async e=>{try{window.Domma?.auth?.getApiUrl?.();const t=window.Domma?.auth?.token,o=t?{Authorization:`Bearer ${t}`}:{},s=await window.Domma.http.post(n,e,{headers:{...a,...o}});if(!s.success)throw new Error(s.message||"Failed to create item");d("Item created successfully"),await this.refresh()}catch(e){throw l(e),e}}}).open()},async edit(e){const o=u.find(t=>t[i]==e);if(!o)return void l(new Error("Item not found"));qo.modal(t,o,{title:`Edit ${o[r]||"Item"}`,size:"xl",saveText:"Update",showSubmitButton:!1,onSave:async t=>{try{window.Domma?.auth?.getApiUrl?.();const o=window.Domma?.auth?.token,s=o?{Authorization:`Bearer ${o}`}:{},i=await window.Domma.http.put(`${n}/${e}`,t,{headers:{...a,...s}});if(!i.success)throw new Error(i.message||"Failed to update item");d("Item updated successfully"),await this.refresh()}catch(e){throw l(e),e}}}).open()},async delete(e){const t=u.find(t=>t[i]==e);if(!t)return void l(new Error("Item not found"));if(await window.Domma.elements.confirm(`Are you sure you want to delete "${t[r]||"this item"}"?\n\nThis action cannot be undone.`,{title:"Confirm Delete",confirmText:"Delete",cancelText:"Cancel",type:"warning"}))try{window.Domma?.auth?.getApiUrl?.();const t=window.Domma?.auth?.token,o=t?{Authorization:`Bearer ${t}`}:{},s=await window.Domma.http.delete(`${n}/${e}`,{headers:{...a,...o}});if(!s.success)throw new Error(s.message||"Failed to delete item");d("Item deleted successfully"),await this.refresh()}catch(e){l(e)}},async refresh(){try{await this.loadData(),h&&(h.setData(u),this.initializeTableIcons())}catch(e){}},getData:()=>[...u],getTable:()=>h,addItem:e=>{u.push(e),h&&h.setData(u)},updateItem:(e,t)=>{const n=u.findIndex(t=>t[i]==e);-1!==n&&(u[n]={...u[n],...t},h&&h.setData(u))},removeItem:e=>{const t=u.findIndex(t=>t[i]==e);-1!==t&&(u.splice(t,1),h&&h.setData(u))}}}};function Uo(e,t){let n;if("string"==typeof e)n=Array.from(document.querySelectorAll(e));else if(e instanceof Element)n=[e];else{if(!(e instanceof NodeList||Array.isArray(e)))return console.error(`[Domma.effects.${t}] Invalid selector`),null;n=Array.from(e)}return 0===n.length?(console.warn(`[Domma.effects.${t}] No elements found`),null):n}function Ko(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}const Yo={club:{origins:["tl","tr","bl","br"],motion:"sweep",sweepArc:100,speed:1,beamWidth:16,flicker:!0,hz:10,colours:["#ffffff","#38bdf8","#f472b6","#a855f7"],intensity:.7},concert:{origins:["tl","tr"],motion:"sweep",sweepArc:120,speed:.8,beamWidth:18,flicker:!0,hz:6,colours:["#f43f5e","#fb923c","#facc15","#22c55e","#3b82f6"],intensity:.75},police:{origins:["tl","tr"],motion:"sweep",sweepArc:70,speed:2.2,beamWidth:22,flicker:!0,hz:8,colours:["#ef4444","#3b82f6"],intensity:.85},searchlight:{origins:["bl","br"],motion:"rotate",sweepArc:90,speed:.5,beamWidth:12,flicker:!1,hz:0,colours:["#fffbe6","#fde68a"],intensity:.6},scanner:{origins:["tl","tr","bl","br"],motion:"sweep",sweepArc:60,speed:1.6,beamWidth:8,flicker:!1,hz:0,colours:["#22d3ee"],intensity:.7},mood:{origins:["tl","tr","bl","br"],motion:"sweep",sweepArc:140,speed:.35,beamWidth:28,flicker:!1,hz:0,colours:["#a855f7","#6366f1","#ec4899","#38bdf8"],intensity:.45}};function Jo(e,t){let n=String(e).replace("#","");3===n.length&&(n=n.split("").map(e=>e+e).join(""));return`rgba(${parseInt(n.slice(0,2),16)}, ${parseInt(n.slice(2,4),16)}, ${parseInt(n.slice(4,6),16)}, ${t})`}const Go={rainbow:["#ef4444","#f97316","#facc15","#22c55e","#0ea5e9","#6366f1","#a855f7","#ec4899"],festive:["#dc2626","#16a34a","#fbbf24","#3b82f6","#a855f7","#ec4899"],gold:["#fbbf24","#f59e0b","#fde68a","#fffbeb","#d97706","#fcd34d"],silver:["#e5e7eb","#cbd5e1","#94a3b8","#f8fafc","#9ca3af","#d1d5db"],pastel:["#fbcfe8","#bae6fd","#bbf7d0","#fef3c7","#ddd6fe","#fed7aa"],mono:["#1f2937","#4b5563","#9ca3af","#d1d5db","#f3f4f6"],sunset:["#f43f5e","#fb923c","#facc15","#f59e0b","#ec4899"],ocean:["#0ea5e9","#22d3ee","#06b6d4","#3b82f6","#6366f1"],forest:["#16a34a","#65a30d","#84cc16","#22c55e","#15803d"],bridal:["#ffffff","#fef3c7","#fce7f3","#fbcfe8","#f9a8d4"],meadow:["#84cc16","#a3e635","#bbf7d0","#bae6fd","#fef08a","#ddd6fe"],firefly:["#fde68a","#facc15","#f59e0b","#a3e635","#fef9c3"],aqua:["#a5f3fc","#67e8f9","#22d3ee","#bae6fd","#e0f2fe"],autumn:["#b45309","#d97706","#f59e0b","#ca8a04","#92400e","#dc2626"]};function Xo(e){if(Array.isArray(e)&&e.length>0)return e;if("string"==typeof e&&Go[e])return Go[e];if("theme"===e||!e){const e=document.documentElement,t=getComputedStyle(e),n=["--dm-primary","--dm-secondary","--dm-success","--dm-warning","--dm-danger","--dm-info"].map(e=>t.getPropertyValue(e).trim()).filter(e=>e&&"transparent"!==e);return n.length>0?n:Go.rainbow}return console.warn(`[Domma.effects] Unknown palette '${e}', using rainbow.`),Go.rainbow}const Zo=Xo;var Qo={breathe:function(e,t={}){const n={amplitude:6,duration:3e3,easing:"ease-in-out",delay:0,stagger:0,iterations:"infinite",pauseOnHover:!1,autoStart:!0,respectMotionPreference:!0,onStart:null,onComplete:null,...t};let o;if("string"==typeof e)o=document.querySelectorAll(e);else if(e instanceof Element)o=[e];else{if(!(e instanceof NodeList||Array.isArray(e)))return console.error("[Domma.effects.breathe] Invalid selector"),null;o=Array.from(e)}if(0===o.length)return console.warn("[Domma.effects.breathe] No elements found"),null;if(n.respectMotionPreference&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)return console.log("[Domma.effects.breathe] Disabled due to prefers-reduced-motion"),{pause:()=>{},resume:()=>{},stop:()=>{},restart:()=>{},destroy:()=>{},isRunning:()=>!1,isPaused:()=>!1};const s=`domma-breathe-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,i=`\n @keyframes ${s} {\n 0%, 100% {\n transform: translateY(0);\n }\n 50% {\n transform: translateY(-${n.amplitude}px);\n }\n }\n `,r=document.createElement("style");r.setAttribute("data-domma-effect",s),r.textContent=i,document.head.appendChild(r);const a=new Map;return o.forEach((e,t)=>{const o=n.delay+t*n.stagger;if(e.style.animation=`${s} ${n.duration}ms ${n.easing} ${o}ms ${n.iterations}`,n.pauseOnHover){const t=()=>{e.style.animationPlayState="paused"},n=()=>{e.style.animationPlayState="running"};e.addEventListener("mouseenter",t),e.addEventListener("mouseleave",n),a.set(e,{mouseEnterHandler:t,mouseLeaveHandler:n})}if(n.onComplete&&"infinite"!==n.iterations){const t=()=>{n.onComplete(),e.removeEventListener("animationend",t)};e.addEventListener("animationend",t)}}),n.onStart&&n.onStart(),{pause(){o.forEach(e=>{e.style.animationPlayState="paused"})},resume(){o.forEach(e=>{e.style.animationPlayState="running"})},stop(){o.forEach(e=>{e.style.animation="none"})},restart(){o.forEach((e,t)=>{const o=n.delay+t*n.stagger;e.style.animation="none",e.offsetHeight,e.style.animation=`${s} ${n.duration}ms ${n.easing} ${o}ms ${n.iterations}`})},destroy(){o.forEach(e=>{if(e.style.animation="none",a.has(e)){const t=a.get(e);e.removeEventListener("mouseenter",t.mouseEnterHandler),e.removeEventListener("mouseleave",t.mouseLeaveHandler),a.delete(e)}}),r.remove()},isRunning(){if(0===o.length)return!1;const e=o[0];return"paused"!==e.style.animationPlayState&&"none"!==e.style.animation},isPaused:()=>0!==o.length&&"paused"===o[0].style.animationPlayState}},pulse:function(e,t={}){const n={scale:1.05,duration:2e3,easing:"ease-in-out",delay:0,stagger:0,iterations:"infinite",pauseOnHover:!1,respectMotionPreference:!0,...t};let o;if("string"==typeof e)o=document.querySelectorAll(e);else if(e instanceof Element)o=[e];else{if(!(e instanceof NodeList||Array.isArray(e)))return console.error("[Domma.effects.pulse] Invalid selector"),null;o=Array.from(e)}if(0===o.length)return console.warn("[Domma.effects.pulse] No elements found"),null;if(n.respectMotionPreference&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)return{pause:()=>{},resume:()=>{},stop:()=>{},restart:()=>{},destroy:()=>{},isRunning:()=>!1,isPaused:()=>!1};const s=`domma-pulse-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,i=`\n @keyframes ${s} {\n 0%, 100% {\n transform: scale(1);\n }\n 50% {\n transform: scale(${n.scale});\n }\n }\n `,r=document.createElement("style");r.setAttribute("data-domma-effect",s),r.textContent=i,document.head.appendChild(r);const a=new Map;return o.forEach((e,t)=>{const o=n.delay+t*n.stagger;if(e.style.animation=`${s} ${n.duration}ms ${n.easing} ${o}ms ${n.iterations}`,n.pauseOnHover){const t=()=>e.style.animationPlayState="paused",n=()=>e.style.animationPlayState="running";e.addEventListener("mouseenter",t),e.addEventListener("mouseleave",n),a.set(e,{mouseEnterHandler:t,mouseLeaveHandler:n})}}),{pause(){o.forEach(e=>e.style.animationPlayState="paused")},resume(){o.forEach(e=>e.style.animationPlayState="running")},stop(){o.forEach(e=>e.style.animation="none")},restart(){o.forEach((e,t)=>{const o=n.delay+t*n.stagger;e.style.animation="none",e.offsetHeight,e.style.animation=`${s} ${n.duration}ms ${n.easing} ${o}ms ${n.iterations}`})},destroy(){o.forEach(e=>{if(e.style.animation="none",a.has(e)){const t=a.get(e);e.removeEventListener("mouseenter",t.mouseEnterHandler),e.removeEventListener("mouseleave",t.mouseLeaveHandler),a.delete(e)}}),r.remove()},isRunning:()=>o.length>0&&"paused"!==o[0].style.animationPlayState&&"none"!==o[0].style.animation,isPaused:()=>o.length>0&&"paused"===o[0].style.animationPlayState}},scribe:function(e,t={}){const n={mode:"typewriter",speed:50,deleteSpeed:30,cursor:!0,cursorChar:"|",cursorBlink:!0,cursorType:"caret",loop:!1,loopDelay:1e3,pauseOnHover:!1,autoStart:!0,respectMotionPreference:!0,actions:[],onStart:null,onComplete:null,onCharacter:null,onRender:null,onUndoRender:null,onLoop:null,...t};let o;if("string"==typeof e)o=Array.from(document.querySelectorAll(e));else if(e instanceof Element)o=[e];else{if(!(e instanceof NodeList||Array.isArray(e)))return console.error("[Domma.effects.scribe] Invalid selector"),null;o=Array.from(e)}if(0===o.length)return console.warn("[Domma.effects.scribe] No elements found"),null;if(n.respectMotionPreference&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)return console.log("[Domma.effects.scribe] Disabled due to prefers-reduced-motion"),{pause:()=>{},resume:()=>{},stop:()=>{},restart:()=>{},destroy:()=>{},isRunning:()=>!1,isPaused:()=>!1};const s=o.map(e=>({element:e,unitSpans:[],cursorSpan:null,currentAction:0,charTimerId:null,waitTimerId:null,paused:!1,loopCount:0,lastRenderStart:0})),i=new Map;async function r(e){if(e.paused)return;if(e.currentAction>=n.actions.length)return void(!0===n.loop||"number"==typeof n.loop&&e.loopCount<n.loop-1?(e.loopCount++,n.onLoop&&n.onLoop(e.loopCount),e.unitSpans.forEach(e=>e.remove()),e.unitSpans=[],e.lastRenderStart=0,e.currentAction=0,e.waitTimerId=setTimeout(()=>{e.paused||r(e)},n.loopDelay)):n.onComplete&&n.onComplete());const t=n.actions[e.currentAction];void 0!==t.render?await function(e,t){return new Promise(o=>{const s=String(t.render),i=t.effect||"none",r=function(e,t){if("word"===t)return e.match(/(\S+\s*)/g)||[];if("sentence"===t){const t=e.match(/([^.!?]*[.!?]+\s*)/g)||[],n=t.join("");return n.length<e.length&&t.push(e.substring(n.length)),t}return e.split("")}(s,n.mode),a="word"===(l=n.mode)?"dm-scribe-word":"sentence"===l?"dm-scribe-sentence":"dm-scribe-char";var l;e.lastRenderStart=e.unitSpans.length;let d=0,c=performance.now();function h(t){if(e.paused)return;if(d>=r.length)return n.onRender&&n.onRender(s),void o();if(t-c<n.speed)return void(e.charTimerId=requestAnimationFrame(h));c=t;const l=r[d],u=document.createElement("span");u.className=a,u.textContent=l,"fade"===i?u.classList.add("dm-scribe-fade"):"bounce"===i?u.classList.add("dm-scribe-bounce"):"glow"===i&&u.classList.add("dm-scribe-glow");const p=document.createDocumentFragment();p.appendChild(u),e.cursorSpan?e.element.insertBefore(p,e.cursorSpan):e.element.appendChild(p),e.unitSpans.push(u),n.onCharacter&&n.onCharacter(l,e.unitSpans.length-1),d++,e.charTimerId=requestAnimationFrame(h)}e.charTimerId=requestAnimationFrame(h)})}(e,t):void 0!==t.wait?await function(e,t){return new Promise(n=>{const o=function(e){if("number"==typeof e)return Number.isFinite(e)?e:0;if("string"!=typeof e)return 0;const t=parseFloat(e);return Number.isFinite(t)?e.endsWith("ms")?t:e.endsWith("s")?1e3*t:0:0}(t.wait);e.waitTimerId=setTimeout(()=>{e.paused||n()},o)})}(e,t):void 0!==t.undoRender&&await function(e,t){return new Promise(o=>{let s=0;const i=t.undoRender;if(!0===i?s=e.unitSpans.length-e.lastRenderStart:"all"===i?s=e.unitSpans.length:"number"==typeof i&&(s=Math.min(i,e.unitSpans.length)),0===s)return void o();const r=[];let a=0,l=performance.now();function d(t){if(e.paused)return;if(a>=s){const e=r.reverse().join("");return n.onUndoRender&&n.onUndoRender(e),void o()}if(t-l<n.deleteSpeed)e.charTimerId=requestAnimationFrame(d);else{if(l=t,e.unitSpans.length>0){const t=e.unitSpans.pop();r.push(t.textContent),t.remove()}a++,e.charTimerId=requestAnimationFrame(d)}}e.charTimerId=requestAnimationFrame(d)})}(e,t),e.currentAction++,r(e)}return s.forEach(e=>{if(n.cursor){e.cursorSpan=document.createElement("span");let t=["dm-scribe-cursor"];"block"===n.cursorType?t.push("dm-scribe-cursor-block"):"underline"===n.cursorType?t.push("dm-scribe-cursor-underline"):t.push("dm-scribe-cursor-caret"),n.cursorBlink||t.push("dm-scribe-cursor-no-blink"),e.cursorSpan.className=t.join(" "),e.cursorSpan.textContent="underline"===n.cursorType?" ":n.cursorChar,e.element.appendChild(e.cursorSpan)}}),s.forEach(e=>{if(n.pauseOnHover){const t=()=>{e.paused=!0,e.charTimerId&&cancelAnimationFrame(e.charTimerId),e.waitTimerId&&clearTimeout(e.waitTimerId)},n=()=>{e.paused=!1,r(e)};e.element.addEventListener("mouseenter",t),e.element.addEventListener("mouseleave",n),i.set(e.element,{mouseEnterHandler:t,mouseLeaveHandler:n})}n.autoStart&&r(e)}),n.onStart&&n.onStart(),{pause(){s.forEach(e=>{e.paused=!0,e.charTimerId&&cancelAnimationFrame(e.charTimerId),e.waitTimerId&&clearTimeout(e.waitTimerId)})},resume(){s.forEach(e=>{e.paused=!1,r(e)})},stop(){s.forEach(e=>{e.paused=!0,e.currentAction=n.actions.length,e.charTimerId&&cancelAnimationFrame(e.charTimerId),e.waitTimerId&&clearTimeout(e.waitTimerId)})},restart(){s.forEach(e=>{e.charTimerId&&cancelAnimationFrame(e.charTimerId),e.waitTimerId&&clearTimeout(e.waitTimerId),e.unitSpans.forEach(e=>e.remove()),e.unitSpans=[],e.currentAction=0,e.loopCount=0,e.lastRenderStart=0,e.paused=!1,r(e)})},destroy(){s.forEach(e=>{if(e.charTimerId&&cancelAnimationFrame(e.charTimerId),e.waitTimerId&&clearTimeout(e.waitTimerId),e.unitSpans.forEach(e=>e.remove()),e.cursorSpan&&e.cursorSpan.remove(),i.has(e.element)){const t=i.get(e.element);e.element.removeEventListener("mouseenter",t.mouseEnterHandler),e.element.removeEventListener("mouseleave",t.mouseLeaveHandler),i.delete(e.element)}})},isRunning(){if(0===s.length)return!1;const e=s[0];return!e.paused&&e.currentAction<n.actions.length},isPaused:()=>0!==s.length&&s[0].paused}},reveal:function(e,t={}){const n={animation:"fade",duration:600,easing:"ease-out",delay:0,stagger:0,threshold:.1,rootMargin:"0px",once:!0,respectMotionPreference:!0,onReveal:null,...t},o=Uo(e,"reveal");if(!o)return null;if(n.respectMotionPreference&&Ko())return o.forEach(e=>{e.classList.add("dm-reveal-visible")}),{pause:()=>{},resume:()=>{},stop:()=>{},restart:()=>{},destroy:()=>{},isRunning:()=>!1,isPaused:()=>!1};o.forEach((e,t)=>{e.classList.add("dm-reveal",`dm-reveal-${n.animation}`),e.style.transitionDuration=`${n.duration}ms`,e.style.transitionTimingFunction=n.easing;const o=n.delay+t*n.stagger;o>0&&(e.style.transitionDelay=`${o}ms`),n.respectMotionPreference||e.setAttribute("data-force-animation","true")});const s=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting?(e.target.classList.add("dm-reveal-visible"),n.onReveal&&n.onReveal(e.target),n.once&&s.unobserve(e.target)):n.once||e.target.classList.remove("dm-reveal-visible")})},{threshold:n.threshold,rootMargin:n.rootMargin});return o.forEach(e=>s.observe(e)),{pause(){},resume(){},stop(){s.disconnect()},restart(){o.forEach(e=>{e.classList.remove("dm-reveal-visible"),s.observe(e)})},destroy(){s.disconnect(),o.forEach(e=>{e.classList.remove("dm-reveal","dm-reveal-visible",`dm-reveal-${n.animation}`),e.style.transitionDuration="",e.style.transitionTimingFunction="",e.style.transitionDelay=""})},isRunning:()=>!0,isPaused:()=>!1}},scramble:function(e,t={}){const n={speed:50,scrambleSpeed:30,characters:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%&*",revealOrder:"left-to-right",scrambleDuration:800,stagger:0,loop:!1,loopDelay:2e3,respectMotionPreference:!0,onComplete:null,onCharacter:null,...t},o=Uo(e,"scramble");if(!o)return null;if(n.respectMotionPreference&&Ko())return{pause:()=>{},resume:()=>{},stop:()=>{},restart:()=>{},destroy:()=>{},isRunning:()=>!1,isPaused:()=>!1};const s=o.map((e,t)=>({element:e,originalText:e.textContent,rafId:null,timeoutId:null,paused:!1,loopCount:0}));function i(){return n.characters[Math.floor(Math.random()*n.characters.length)]}function r(e){if(e.paused)return;const t=e.originalText,o=t.length;if(0===o)return void(n.onComplete&&n.onComplete());const s=function(e,t){const n=Array.from({length:e},(e,t)=>t);switch(t){case"right-to-left":return n.reverse();case"random":for(let e=n.length-1;e>0;e--){const t=Math.floor(Math.random()*(e+1));[n[e],n[t]]=[n[t],n[e]]}return n;case"center-out":{const t=Math.floor(e/2),n=[t];for(let o=1;o<=t;o++)t-o>=0&&n.push(t-o),t+o<e&&n.push(t+o);return n}default:return n}}(o,n.revealOrder),a=new Array(o).fill(!1),l=t.split("").map(e=>" "===e?" ":i()),d=performance.now(),c=n.speed;e.rafId=requestAnimationFrame(function h(u){if(e.paused)return;const p=u-d;s.forEach((e,o)=>{if(a[e])return;const s=n.scrambleDuration+o*c;p>=s&&(a[e]=!0,l[e]=t[e],n.onCharacter&&n.onCharacter(t[e],e))});for(let e=0;e<o;e++)a[e]||" "===t[e]||(l[e]=i());if(e.element.innerHTML=l.map((e,t)=>`<span class="dm-scramble-char${a[t]?" dm-scramble-resolved":""}">${e}</span>`).join(""),a.every(Boolean))return n.onComplete&&n.onComplete(),void function(e){if(!1===n.loop)return;if("number"==typeof n.loop&&e.loopCount>=n.loop-1)return;e.loopCount++,e.timeoutId=setTimeout(()=>{e.paused||r(e)},n.loopDelay)}(e);e.rafId=requestAnimationFrame(h)})}return s.forEach((e,t)=>{const o=t*n.stagger;o>0?e.timeoutId=setTimeout(()=>r(e),o):r(e)}),{pause(){s.forEach(e=>{e.paused=!0,e.rafId&&cancelAnimationFrame(e.rafId),e.timeoutId&&clearTimeout(e.timeoutId)})},resume(){s.forEach(e=>{e.paused=!1,r(e)})},stop(){s.forEach(e=>{e.paused=!0,e.rafId&&cancelAnimationFrame(e.rafId),e.timeoutId&&clearTimeout(e.timeoutId),e.element.textContent=e.originalText})},restart(){s.forEach(e=>{e.rafId&&cancelAnimationFrame(e.rafId),e.timeoutId&&clearTimeout(e.timeoutId),e.paused=!1,e.loopCount=0,r(e)})},destroy(){s.forEach(e=>{e.rafId&&cancelAnimationFrame(e.rafId),e.timeoutId&&clearTimeout(e.timeoutId),e.element.textContent=e.originalText})},isRunning:()=>s.length>0&&!s[0].paused,isPaused:()=>s.length>0&&s[0].paused}},counter:function(e,t={}){const n={from:0,to:null,duration:2e3,easing:"ease-out",decimals:0,separator:",",prefix:"",suffix:"",stagger:0,trigger:"immediate",threshold:.5,respectMotionPreference:!0,onUpdate:null,onComplete:null,...t},o=Uo(e,"counter");if(!o)return null;if(n.respectMotionPreference&&Ko())return o.forEach(e=>{const t=null!==n.to?n.to:parseFloat(e.textContent.replace(/[^0-9.\-]/g,""))||0;e.textContent=n.prefix+s(t,n.decimals,n.separator)+n.suffix}),{pause:()=>{},resume:()=>{},stop:()=>{},restart:()=>{},destroy:()=>{},isRunning:()=>!1,isPaused:()=>!1};function s(e,t,n){const o=e.toFixed(t);if(!n)return o;const s=o.split(".");return s[0]=s[0].replace(/\B(?=(\d{3})+(?!\d))/g,n),s.join(".")}const i=o.map((e,t)=>{const o=null!==n.to?n.to:parseFloat(e.textContent.replace(/[^0-9.\-]/g,""))||0;return{element:e,from:n.from,to:o,rafId:null,timeoutId:null,startTime:null,paused:!1,complete:!1}});function r(e){e.paused||(e.startTime=performance.now(),e.complete=!1,e.rafId=requestAnimationFrame(function t(o){if(e.paused)return;const i=o-e.startTime,r=Math.min(i/n.duration,1),a=function(e){switch(n.easing){case"linear":return e;case"ease-in-out":return e<.5?2*e*e:(4-2*e)*e-1;default:return 1-Math.pow(1-e,3)}}(r),l=e.from+(e.to-e.from)*a;e.element.textContent=n.prefix+s(l,n.decimals,n.separator)+n.suffix,n.onUpdate&&n.onUpdate(l),r<1?e.rafId=requestAnimationFrame(t):(e.complete=!0,e.element.textContent=n.prefix+s(e.to,n.decimals,n.separator)+n.suffix,n.onComplete&&n.onComplete())}))}let a=null;function l(e,t){t>0?e.timeoutId=setTimeout(()=>r(e),t):r(e)}return"scroll"===n.trigger?(a=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting){const t=i.find(t=>t.element===e.target);if(t&&!t.complete){l(t,i.indexOf(t)*n.stagger)}a.unobserve(e.target)}})},{threshold:n.threshold}),o.forEach(e=>a.observe(e))):i.forEach((e,t)=>{l(e,t*n.stagger)}),{pause(){i.forEach(e=>{e.paused=!0,e.rafId&&cancelAnimationFrame(e.rafId),e.timeoutId&&clearTimeout(e.timeoutId)})},resume(){i.forEach(e=>{e.paused&&!e.complete&&(e.paused=!1,r(e))})},stop(){i.forEach(e=>{e.paused=!0,e.rafId&&cancelAnimationFrame(e.rafId),e.timeoutId&&clearTimeout(e.timeoutId)}),a&&a.disconnect()},restart(){i.forEach((e,t)=>{e.rafId&&cancelAnimationFrame(e.rafId),e.timeoutId&&clearTimeout(e.timeoutId),e.paused=!1,e.complete=!1,l(e,t*n.stagger)})},destroy(){i.forEach(e=>{e.rafId&&cancelAnimationFrame(e.rafId),e.timeoutId&&clearTimeout(e.timeoutId)}),a&&a.disconnect()},isRunning:()=>i.length>0&&!i[0].paused&&!i[0].complete,isPaused:()=>i.length>0&&i[0].paused}},ripple:function(e,t={}){const n={colour:"rgba(255, 255, 255, 0.35)",duration:600,opacity:.35,unbounded:!1,centered:!1,trigger:"pointerdown",respectMotionPreference:!0,...t},o=Uo(e,"ripple");if(!o)return null;if(n.respectMotionPreference&&Ko())return{pause:()=>{},resume:()=>{},stop:()=>{},restart:()=>{},destroy:()=>{},isRunning:()=>!1,isPaused:()=>!1};const s="domma-ripple-keyframes";if(!document.getElementById(s)){const e=document.createElement("style");e.id=s,e.textContent="\n @keyframes dm-ripple-expand {\n 0% {\n transform: scale(0);\n opacity: var(--dm-ripple-opacity, 0.35);\n }\n 100% {\n transform: scale(4);\n opacity: 0;\n }\n }\n ",document.head.appendChild(e)}const i=new Map;return o.forEach(e=>{e.classList.add("dm-ripple-container");"static"===getComputedStyle(e).position&&(e.style.position="relative"),n.unbounded||(e.style.overflow="hidden"),n.respectMotionPreference||e.setAttribute("data-force-animation","true");const t=t=>{const o=e.getBoundingClientRect(),s=2*Math.max(o.width,o.height);let i,r;n.centered?(i=o.width/2,r=o.height/2):(i=(t.clientX||t.touches?.[0]?.clientX||o.width/2)-o.left,r=(t.clientY||t.touches?.[0]?.clientY||o.height/2)-o.top);const a=document.createElement("span");a.className="dm-ripple",n.respectMotionPreference||a.setAttribute("data-force-animation","true"),a.style.cssText=`\n position: absolute;\n border-radius: 50%;\n pointer-events: none;\n width: ${s}px;\n height: ${s}px;\n left: ${i-s/2}px;\n top: ${r-s/2}px;\n background: ${n.colour};\n --dm-ripple-opacity: ${n.opacity};\n animation: dm-ripple-expand ${n.duration}ms ease-out forwards;\n `,e.appendChild(a),setTimeout(()=>{a.remove()},n.duration)};e.addEventListener(n.trigger,t),i.set(e,t)}),{pause(){},resume(){},stop(){},restart(){},destroy(){o.forEach(e=>{i.has(e)&&(e.removeEventListener(n.trigger,i.get(e)),i.delete(e)),e.classList.remove("dm-ripple-container"),e.querySelectorAll(".dm-ripple").forEach(e=>e.remove())})},isRunning:()=>!0,isPaused:()=>!1}},shake:function(e,t={}){const n={intensity:6,duration:500,direction:"horizontal",easing:"ease-in-out",iterations:1,stagger:0,respectMotionPreference:!0,onComplete:null,...t},o=Uo(e,"shake");if(!o)return null;if(n.respectMotionPreference&&Ko())return n.onComplete&&n.onComplete(),{pause:()=>{},resume:()=>{},stop:()=>{},restart:()=>{},destroy:()=>{},isRunning:()=>!1,isPaused:()=>!1};const s=`domma-shake-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,i=n.intensity;let r;switch(n.direction){case"vertical":r=`\n 0%, 100% { transform: translateY(0); }\n 10%, 30%, 50%, 70%, 90% { transform: translateY(-${i}px); }\n 20%, 40%, 60%, 80% { transform: translateY(${i}px); }\n `;break;case"both":r=`\n 0%, 100% { transform: translate(0, 0); }\n 10% { transform: translate(-${i}px, -${i}px); }\n 20% { transform: translate(${i}px, ${i}px); }\n 30% { transform: translate(-${i}px, ${i}px); }\n 40% { transform: translate(${i}px, -${i}px); }\n 50% { transform: translate(-${i}px, 0); }\n 60% { transform: translate(${i}px, 0); }\n 70% { transform: translate(0, -${i}px); }\n 80% { transform: translate(0, ${i}px); }\n 90% { transform: translate(-${i}px, -${i}px); }\n `;break;default:r=`\n 0%, 100% { transform: translateX(0); }\n 10%, 30%, 50%, 70%, 90% { transform: translateX(-${i}px); }\n 20%, 40%, 60%, 80% { transform: translateX(${i}px); }\n `}const a=document.createElement("style");a.setAttribute("data-domma-effect",s),a.textContent=`@keyframes ${s} { ${r} }`,document.head.appendChild(a);const l=new Map;return o.forEach((e,t)=>{const i=t*n.stagger,r=()=>{e.style.animation=`${s} ${n.duration}ms ${n.easing} ${n.iterations}`;const i=()=>{e.style.animation="",e.removeEventListener("animationend",i),l.delete(e),n.onComplete&&t===o.length-1&&n.onComplete()};e.addEventListener("animationend",i),l.set(e,i)};i>0?setTimeout(r,i):r()}),{pause(){o.forEach(e=>e.style.animationPlayState="paused")},resume(){o.forEach(e=>e.style.animationPlayState="running")},stop(){o.forEach(e=>{e.style.animation="",l.has(e)&&(e.removeEventListener("animationend",l.get(e)),l.delete(e))})},restart(){o.forEach((e,t)=>{e.style.animation="none",e.offsetHeight,e.style.animation=`${s} ${n.duration}ms ${n.easing} ${n.iterations}`})},destroy(){o.forEach(e=>{e.style.animation="",l.has(e)&&(e.removeEventListener("animationend",l.get(e)),l.delete(e))}),a.remove()},isRunning:()=>o.length>0&&""!==o[0].style.animation&&"paused"!==o[0].style.animationPlayState,isPaused:()=>o.length>0&&"paused"===o[0].style.animationPlayState}},twinkle:function(e,t={}){const n={count:100,minSize:1,maxSize:3,twinkleSpeed:.003,colour:"rgba(255, 240, 200, 1)",zIndex:1,shape:"star",respectMotionPreference:!0,...t};if(n.respectMotionPreference&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)return console.log("[Domma.effects.twinkle] Disabled due to prefers-reduced-motion"),{pause:()=>{},resume:()=>{},stop:()=>{},restart:()=>{},destroy:()=>{},isRunning:()=>!1,isPaused:()=>!1};const o=!e||"body"===e||e===document.body;let s=[];if(!o&&("string"==typeof e?s=Array.from(document.querySelectorAll(e)):e instanceof Element?s=[e]:(e instanceof NodeList||Array.isArray(e))&&(s=Array.from(e)),0===s.length))return console.warn("[Domma.effects.twinkle] No elements found for selector:",e),null;let i=!1,r=!1,a=null;const l=`domma-twinkle-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,d=[];function c(e,t){const o=[];for(let s=0;s<n.count;s++)o.push({x:Math.random()*e,y:Math.random()*t,size:n.minSize+Math.random()*(n.maxSize-n.minSize),opacity:.3+.7*Math.random(),twinklePhase:Math.random()*Math.PI*2,twinkleSpeed:n.twinkleSpeed+Math.random()*n.twinkleSpeed});return o}function h(e,t){const o=document.createElement("canvas");if(o.id=l+(d.length>0?`-${d.length}`:""),o.setAttribute("data-domma-effect","twinkle"),o.style.pointerEvents="none",o.style.zIndex=n.zIndex,t)o.style.position="fixed",o.style.top="0",o.style.left="0",o.style.width="100%",o.style.height="100%",o.width=window.innerWidth,o.height=window.innerHeight,document.body.appendChild(o);else{"static"===window.getComputedStyle(e).position&&(e.style.position="relative"),o.style.position="absolute",o.style.top="0",o.style.left="0",o.style.width="100%",o.style.height="100%",o.width=e.offsetWidth||e.getBoundingClientRect().width,o.height=e.offsetHeight||e.getBoundingClientRect().height,e.appendChild(o)}const s=o.getContext("2d");return{canvas:o,ctx:s,stars:c(o.width,o.height),container:e}}function u(e){if(e.isFixed)e.canvas.width=window.innerWidth,e.canvas.height=window.innerHeight;else{const t=e.container.getBoundingClientRect();e.canvas.width=t.width||e.container.offsetWidth,e.canvas.height=t.height||e.container.offsetHeight}e.stars=c(e.canvas.width,e.canvas.height)}if(o){const e=h(document.body,!0);e.isFixed=!0,d.push(e)}else s.forEach(e=>{const t=h(e,!1);t.isFixed=!1,d.push(t)});let p=null;if(o){const e=()=>d.forEach(e=>u(e));window.addEventListener("resize",e),d[0]._resizeHandler=e}else"undefined"!=typeof ResizeObserver&&(p=new ResizeObserver(()=>{d.forEach(e=>u(e))}),s.forEach(e=>p.observe(e)));function m(){i&&!r&&(d.forEach(({canvas:e,ctx:t,stars:o})=>{t.clearRect(0,0,e.width,e.height),o.forEach(e=>function(e,t){t.twinklePhase+=t.twinkleSpeed;const o=.3+.7*Math.sin(t.twinklePhase);if(e.save(),e.globalAlpha=t.opacity*o,e.fillStyle=n.colour,e.shadowColor=n.colour,"circle"===n.shape)e.shadowBlur=2*t.size,e.beginPath(),e.arc(t.x,t.y,.6*t.size,0,2*Math.PI),e.fill();else{e.shadowBlur=2*t.size,e.beginPath();for(let n=0;n<4;n++){const o=n*Math.PI/2,s=t.x+Math.cos(o)*t.size,i=t.y+Math.sin(o)*t.size,r=o+Math.PI/4,a=t.x+Math.cos(r)*(.3*t.size),l=t.y+Math.sin(r)*(.3*t.size);0===n?e.moveTo(s,i):e.lineTo(s,i),e.lineTo(a,l)}e.closePath(),e.fill(),e.shadowBlur=t.size,e.beginPath(),e.arc(t.x,t.y,.25*t.size,0,2*Math.PI),e.fill()}e.restore()}(t,e))}),a=requestAnimationFrame(m))}function f(){i||(i=!0,r=!1,m())}return f(),console.log(`[Domma.effects.twinkle] Initialised with ${n.count} stars (${o?"full-page":"container"} mode)`),{pause(){i&&!r&&(r=!0,a&&(cancelAnimationFrame(a),a=null))},resume(){i&&r&&(r=!1,m())},stop(){i=!1,r=!1,a&&(cancelAnimationFrame(a),a=null)},restart(){this.stop(),d.forEach(e=>{e.stars=c(e.canvas.width,e.canvas.height)}),f()},destroy(){this.stop(),o&&d[0]?._resizeHandler&&window.removeEventListener("resize",d[0]._resizeHandler),p&&(p.disconnect(),p=null),d.forEach(({canvas:e})=>{e&&e.parentNode&&e.parentNode.removeChild(e)}),d.length=0},isRunning:()=>i&&!r,isPaused:()=>i&&r}},tickerTape:function(e,t={}){const n={palette:"theme",density:50,speed:1,sway:60,rotationSpeed:6,minWidth:5,maxWidth:9,minHeight:12,maxHeight:22,fadeStart:.55,burst:!1,burstCount:150,zIndex:1,respectMotionPreference:!0,...t};if(n.respectMotionPreference&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)return console.log("[Domma.effects.tickerTape] Disabled due to prefers-reduced-motion"),{pause:()=>{},resume:()=>{},stop:()=>{},restart:()=>{},destroy:()=>{},isRunning:()=>!1,isPaused:()=>!1};const o=!e||"body"===e||e===document.body;let s=[];if(!o&&("string"==typeof e?s=Array.from(document.querySelectorAll(e)):e instanceof Element?s=[e]:(e instanceof NodeList||Array.isArray(e))&&(s=Array.from(e)),0===s.length))return console.warn("[Domma.effects.tickerTape] No elements found for selector:",e),null;const i=Zo(n.palette);let r=!1,a=!1,l=null;const d=`domma-ticker-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,c=[];let h=null;function u(e,t,o){const s=n.minWidth+Math.random()*(n.maxWidth-n.minWidth),r=n.minHeight+Math.random()*(n.maxHeight-n.minHeight);return{x:Math.random()*e,y:o?-r-40*Math.random():Math.random()*-t,vy:(1+2.2*Math.random())*n.speed,vx:.4*(Math.random()-.5)*n.speed,swayPhase:Math.random()*Math.PI*2,swayFreq:.005+.01*Math.random(),width:s,height:r,rotation:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*n.rotationSpeed*Math.PI/180,colour:i[Math.floor(Math.random()*i.length)],alive:!0}}function p(e,t){e.swayPhase+=e.swayFreq,e.x+=e.vx+Math.sin(e.swayPhase)*(.02*n.sway),e.y+=e.vy,e.rotation+=e.rotationSpeed;const o=e.y/t;if(o>=n.fadeStart){const t=1-n.fadeStart,s=(o-n.fadeStart)/t;e.alpha=Math.max(0,1-s)}else e.alpha=1;(e.y-e.height>t||e.alpha<=.01)&&(e.alive=!1)}function m(e,t){t.alpha<=0||(e.save(),e.globalAlpha=t.alpha,e.translate(t.x,t.y),e.rotate(t.rotation),e.fillStyle=t.colour,e.fillRect(-t.width/2,-t.height/2,t.width,t.height),e.restore())}function f(e,t){const o=document.createElement("canvas");if(o.id=d+(c.length>0?`-${c.length}`:""),o.setAttribute("data-domma-effect","ticker-tape"),o.style.pointerEvents="none",o.style.zIndex=n.zIndex,t)o.style.position="fixed",o.style.top="0",o.style.left="0",o.style.width="100%",o.style.height="100%",o.width=window.innerWidth,o.height=window.innerHeight,document.body.appendChild(o);else{"static"===window.getComputedStyle(e).position&&(e.style.position="relative"),o.style.position="absolute",o.style.top="0",o.style.left="0",o.style.width="100%",o.style.height="100%",o.width=e.offsetWidth||e.getBoundingClientRect().width,o.height=e.offsetHeight||e.getBoundingClientRect().height,e.appendChild(o)}const s=o.getContext("2d");return{canvas:o,ctx:s,particles:[],container:e,burstFired:!1}}function g(e){if(e.particles=[],n.burst){for(let t=0;t<n.burstCount;t++){const t=u(e.canvas.width,e.canvas.height,!1);t.y=-Math.random()*e.canvas.height*1.5,e.particles.push(t)}e.burstFired=!0}else{const t=Math.floor(.5*n.density);for(let n=0;n<t;n++)e.particles.push(u(e.canvas.width,e.canvas.height,!1))}}function v(e){if(e.isFixed)e.canvas.width=window.innerWidth,e.canvas.height=window.innerHeight;else{const t=e.container.getBoundingClientRect();e.canvas.width=t.width||e.container.offsetWidth,e.canvas.height=t.height||e.container.offsetHeight}}if(o){const e=f(document.body,!0);e.isFixed=!0,g(e),c.push(e);const t=()=>c.forEach(e=>v(e));window.addEventListener("resize",t),c[0]._resizeHandler=t}else s.forEach(e=>{const t=f(e,!1);t.isFixed=!1,g(t),c.push(t)}),"undefined"!=typeof ResizeObserver&&(h=new ResizeObserver(()=>{c.forEach(e=>v(e))}),s.forEach(e=>h.observe(e)));function y(){r&&!a&&(c.forEach(e=>{const{canvas:t,ctx:o,particles:s}=e;o.clearRect(0,0,t.width,t.height);for(let e=s.length-1;e>=0;e--){const n=s[e];p(n,t.height),n.alive?m(o,n):s.splice(e,1)}if(!n.burst){const e=n.density;for(;s.length<e&&Math.random()<.6;)s.push(u(t.width,t.height,!0))}}),l=requestAnimationFrame(y))}function b(){r||(r=!0,a=!1,y())}return b(),console.log(`[Domma.effects.tickerTape] Initialised (${o?"full-page":"container"} mode, palette: ${Array.isArray(n.palette)?"custom":n.palette})`),{pause(){r&&!a&&(a=!0,l&&(cancelAnimationFrame(l),l=null))},resume(){r&&a&&(a=!1,y())},stop(){r=!1,a=!1,l&&(cancelAnimationFrame(l),l=null)},restart(){this.stop(),c.forEach(e=>g(e)),b()},destroy(){this.stop(),o&&c[0]?._resizeHandler&&window.removeEventListener("resize",c[0]._resizeHandler),h&&(h.disconnect(),h=null),c.forEach(({canvas:e})=>{e&&e.parentNode&&e.parentNode.removeChild(e)}),c.length=0},isRunning:()=>r&&!a,isPaused:()=>r&&a}},butterflies:function(e,t={}){const n={palette:"meadow",density:18,speed:1,wander:1,riseSpeed:.4,flapSpeed:1,minSize:14,maxSize:26,twoTone:!0,burst:!1,burstCount:40,zIndex:1,respectMotionPreference:!0,...t};if(n.respectMotionPreference&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)return console.log("[Domma.effects.butterflies] Disabled due to prefers-reduced-motion"),{pause:()=>{},resume:()=>{},stop:()=>{},restart:()=>{},destroy:()=>{},isRunning:()=>!1,isPaused:()=>!1};const o=!e||"body"===e||e===document.body;let s=[];if(!o&&("string"==typeof e?s=Array.from(document.querySelectorAll(e)):e instanceof Element?s=[e]:(e instanceof NodeList||Array.isArray(e))&&(s=Array.from(e)),0===s.length))return console.warn("[Domma.effects.butterflies] No elements found for selector:",e),null;const i=Xo(n.palette);let r=!1,a=!1,l=null;const d=`domma-butterflies-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,c=[];let h=null;function u(e,t){const o=n.minSize+Math.random()*(n.maxSize-n.minSize),s=Math.random();let r,a;s<.6?(r=Math.random()*e,a=t+o):s<.8?(r=-o,a=t*(.4+.6*Math.random())):(r=e+o,a=t*(.4+.6*Math.random()));const l=-Math.PI/2+1.2*(Math.random()-.5),d=i[Math.floor(Math.random()*i.length)],c=n.twoTone?i[Math.floor(Math.random()*i.length)]:d;return{x:r,y:a,heading:l,targetHeading:l,speed:.6+.8*Math.random(),wanderTimer:60*Math.random(),flapPhase:Math.random()*Math.PI*2,flapSpeed:(.18+.12*Math.random())*n.flapSpeed,size:o,colourUpper:d,colourLower:c,alpha:1,alive:!0}}function p(e,t,o){e.wanderTimer-=1,e.wanderTimer<=0&&(e.targetHeading=-Math.PI/2+(Math.random()-.5)*(1.4*n.wander),e.wanderTimer=30+Math.random()*(60/Math.max(.2,n.wander)));let s=e.targetHeading-e.heading;for(;s>Math.PI;)s-=2*Math.PI;for(;s<-Math.PI;)s+=2*Math.PI;e.heading+=.05*s*n.wander;const i=e.speed*n.speed;e.x+=Math.cos(e.heading)*i+.3*Math.sin(e.flapPhase),e.y+=Math.sin(e.heading)*i-n.riseSpeed*n.speed,e.flapPhase+=e.flapSpeed,(e.y+e.size<0||e.y-e.size>2*o||e.x<3*-e.size||e.x>t+3*e.size)&&(e.alive=!1)}function m(e,t){const n=Math.abs(Math.sin(t.flapPhase)),o=t.size*(.25+.75*n)/2,s=.6*t.size;e.save(),e.globalAlpha=t.alpha,e.translate(t.x,t.y),e.rotate(t.heading+Math.PI/2),e.fillStyle=t.colourUpper,e.beginPath(),e.ellipse(-o,.3*-s,o,.6*s,0,0,2*Math.PI),e.ellipse(o,.3*-s,o,.6*s,0,0,2*Math.PI),e.fill(),e.fillStyle=t.colourLower,e.beginPath(),e.ellipse(.85*-o,.35*s,.8*o,.5*s,0,0,2*Math.PI),e.ellipse(.85*o,.35*s,.8*o,.5*s,0,0,2*Math.PI),e.fill(),e.strokeStyle="rgba(40,30,30,0.8)",e.lineWidth=Math.max(1,.06*t.size),e.beginPath(),e.moveTo(0,.7*-s),e.lineTo(0,.7*s),e.stroke(),e.restore()}function f(e,t){const o=document.createElement("canvas");o.id=d+(c.length>0?`-${c.length}`:""),o.setAttribute("data-domma-effect","butterflies"),o.style.pointerEvents="none",o.style.zIndex=n.zIndex,t?(o.style.position="fixed",o.style.top="0",o.style.left="0",o.style.width="100%",o.style.height="100%",o.width=window.innerWidth,o.height=window.innerHeight,document.body.appendChild(o)):("static"===window.getComputedStyle(e).position&&(e.style.position="relative"),o.style.position="absolute",o.style.top="0",o.style.left="0",o.style.width="100%",o.style.height="100%",o.width=e.offsetWidth||e.getBoundingClientRect().width,o.height=e.offsetHeight||e.getBoundingClientRect().height,e.appendChild(o));const s=o.getContext("2d");return{canvas:o,ctx:s,particles:[],container:e,burstFired:!1}}function g(e){if(e.particles=[],n.burst){for(let t=0;t<n.burstCount;t++)e.particles.push(u(e.canvas.width,e.canvas.height));e.burstFired=!0}else{const t=Math.floor(.5*n.density);for(let n=0;n<t;n++)e.particles.push(u(e.canvas.width,e.canvas.height))}}function v(e){if(e.isFixed)e.canvas.width=window.innerWidth,e.canvas.height=window.innerHeight;else{const t=e.container.getBoundingClientRect();e.canvas.width=t.width||e.container.offsetWidth,e.canvas.height=t.height||e.container.offsetHeight}}if(o){const e=f(document.body,!0);e.isFixed=!0,g(e),c.push(e);const t=()=>c.forEach(e=>v(e));window.addEventListener("resize",t),c[0]._resizeHandler=t}else s.forEach(e=>{const t=f(e,!1);t.isFixed=!1,g(t),c.push(t)}),"undefined"!=typeof ResizeObserver&&(h=new ResizeObserver(()=>c.forEach(e=>v(e))),s.forEach(e=>h.observe(e)));function y(){r&&!a&&(c.forEach(e=>{const{canvas:t,ctx:o,particles:s}=e;o.clearRect(0,0,t.width,t.height);for(let e=s.length-1;e>=0;e--){const n=s[e];p(n,t.width,t.height),n.alive?m(o,n):s.splice(e,1)}if(!n.burst)for(;s.length<n.density&&Math.random()<.3;)s.push(u(t.width,t.height))}),l=requestAnimationFrame(y))}function b(){r||(r=!0,a=!1,y())}return b(),console.log(`[Domma.effects.butterflies] Initialised (${o?"full-page":"container"} mode, palette: ${Array.isArray(n.palette)?"custom":n.palette})`),{pause(){r&&!a&&(a=!0,l&&(cancelAnimationFrame(l),l=null))},resume(){r&&a&&(a=!1,y())},stop(){r=!1,a=!1,l&&(cancelAnimationFrame(l),l=null)},restart(){this.stop(),c.forEach(e=>g(e)),b()},destroy(){this.stop(),o&&c[0]?._resizeHandler&&window.removeEventListener("resize",c[0]._resizeHandler),h&&(h.disconnect(),h=null),c.forEach(({canvas:e})=>{e&&e.parentNode&&e.parentNode.removeChild(e)}),c.length=0},isRunning:()=>r&&!a,isPaused:()=>r&&a}},strobe:function(e,t={}){var n;const o={preset:"club",origins:["tl","tr","bl","br"],motion:"sweep",sweepArc:100,speed:1,beamWidth:16,flicker:!0,hz:10,colours:["#ffffff","#38bdf8","#f472b6","#a855f7"],intensity:.7,duration:null,zIndex:9999,respectMotionPreference:!0,...(n=t.preset||"club",Yo[n]?Yo[n]:(console.warn(`[Domma.effects.strobe] Unknown preset '${n}', using 'club'.`),Yo.club)),...t};if(o.respectMotionPreference&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)return console.log("[Domma.effects.strobe] Disabled due to prefers-reduced-motion"),{pause:()=>{},resume:()=>{},stop:()=>{},restart:()=>{},destroy:()=>{},isRunning:()=>!1,isPaused:()=>!1};o.flicker&&o.hz>5&&console.warn(`[Domma.effects.strobe] flicker hz=${o.hz} exceeds 5Hz - rapid flashing can trigger photosensitive seizures.`);const s=!e||"body"===e||e===document.body;let i=[];if(!s&&("string"==typeof e?i=Array.from(document.querySelectorAll(e)):e instanceof Element?i=[e]:(e instanceof NodeList||Array.isArray(e))&&(i=Array.from(e)),0===i.length))return console.warn("[Domma.effects.strobe] No elements found for selector:",e),null;let r=!1,a=!1,l=null,d=null;const c=`domma-strobe-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,h=[];let u=null;function p(){return o.origins.map((e,t)=>({corner:e,colour:o.colours[t%o.colours.length],phase:t/Math.max(1,o.origins.length)*Math.PI*2}))}const m=[{widthMul:1.9,alphaMul:.16},{widthMul:1,alphaMul:.5},{widthMul:.45,alphaMul:1}];function f(e,t){const n=document.createElement("canvas");n.id=c+(h.length>0?`-${h.length}`:""),n.setAttribute("data-domma-effect","strobe"),n.style.pointerEvents="none",n.style.zIndex=o.zIndex,t?(n.style.position="fixed",n.style.top="0",n.style.left="0",n.style.width="100%",n.style.height="100%",n.width=window.innerWidth,n.height=window.innerHeight,document.body.appendChild(n)):("static"===window.getComputedStyle(e).position&&(e.style.position="relative"),n.style.position="absolute",n.style.top="0",n.style.left="0",n.style.width="100%",n.style.height="100%",n.width=e.offsetWidth||e.getBoundingClientRect().width,n.height=e.offsetHeight||e.getBoundingClientRect().height,e.appendChild(n));const s=n.getContext("2d");return{canvas:n,ctx:s,container:e,beams:p()}}function g(e){if(e.isFixed)e.canvas.width=window.innerWidth,e.canvas.height=window.innerHeight;else{const t=e.container.getBoundingClientRect();e.canvas.width=t.width||e.container.offsetWidth,e.canvas.height=t.height||e.container.offsetHeight}}if(s){const e=f(document.body,!0);e.isFixed=!0,h.push(e);const t=()=>h.forEach(e=>g(e));window.addEventListener("resize",t),h[0]._resizeHandler=t}else i.forEach(e=>{const t=f(e,!1);t.isFixed=!1,h.push(t)}),"undefined"!=typeof ResizeObserver&&(u=new ResizeObserver(()=>h.forEach(e=>g(e))),i.forEach(e=>u.observe(e)));function v(){if(!r||a)return;let e=1;if(o.flicker){const t=.5+.5*Math.sin(("undefined"!=typeof performance&&performance.now?performance.now():Date.now())/1e3*o.hz*Math.PI*2);e=.4+.6*t}h.forEach(t=>{const{canvas:n,ctx:s,beams:i}=t,r=n.width,a=n.height;s.globalCompositeOperation="destination-out",s.fillStyle="rgba(0, 0, 0, 0.14)",s.fillRect(0,0,r,a),s.globalCompositeOperation="lighter";const l=r/2,d=a/2;i.forEach(t=>{const{x:n,y:i}=function(e,t,n){switch(e){case"tr":return{x:t,y:0};case"bl":return{x:0,y:n};case"br":return{x:t,y:n};default:return{x:0,y:0}}}(t.corner,r,a);let c;if("rotate"===o.motion)c=t.phase,t.phase+=.01*o.speed;else{c=Math.atan2(d-i,l-n)+Math.sin(t.phase)*(o.sweepArc*Math.PI/180)/2,t.phase+=.02*o.speed}!function(e,t,n,s,i,r,a,l){const d=1.5*Math.hypot(r,a),c=o.beamWidth*Math.PI/180/2;for(let r=0;r<m.length;r++){const a=m[r],h=c*a.widthMul,u=o.intensity*a.alphaMul*l;if(u<=.003)continue;const p=t+Math.cos(s-h)*d,f=n+Math.sin(s-h)*d,g=t+Math.cos(s+h)*d,v=n+Math.sin(s+h)*d,y=e.createRadialGradient(t,n,0,t,n,d);y.addColorStop(0,Jo(i,u)),y.addColorStop(.4,Jo(i,.4*u)),y.addColorStop(1,Jo(i,0)),e.fillStyle=y,e.beginPath(),e.moveTo(t,n),e.lineTo(p,f),e.lineTo(g,v),e.closePath(),e.fill()}}(s,n,i,c,t.colour,r,a,e)}),s.globalCompositeOperation="source-over"}),l=requestAnimationFrame(v)}function y(){r||(r=!0,a=!1,v(),o.duration&&(d=setTimeout(()=>b.stop(),o.duration)))}const b={pause(){r&&!a&&(a=!0,l&&(cancelAnimationFrame(l),l=null))},resume(){r&&a&&(a=!1,v())},stop(){r=!1,a=!1,l&&(cancelAnimationFrame(l),l=null),d&&(clearTimeout(d),d=null),h.forEach(({canvas:e,ctx:t})=>t&&t.clearRect(0,0,e.width,e.height))},restart(){this.stop(),h.forEach(e=>{e.beams=p()}),y()},destroy(){this.stop(),s&&h[0]?._resizeHandler&&window.removeEventListener("resize",h[0]._resizeHandler),u&&(u.disconnect(),u=null),h.forEach(({canvas:e})=>{e&&e.parentNode&&e.parentNode.removeChild(e)}),h.length=0},isRunning:()=>r&&!a,isPaused:()=>r&&a};return y(),console.log(`[Domma.effects.strobe] Initialised (${s?"full-page":"container"} mode, preset: ${o.preset})`),b}};const es={_configs:new Map,_components:new Map,_eventHandlers:new Map,_initCallbacks:[],_domReady:!1,_autoWrap:!0,process(e,t={}){if(!e||"object"!=typeof e)return;(void 0!==t.autoWrap?t.autoWrap:this._autoWrap)&&!this._domReady&&"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{this._domReady=!0,this._processConfig(e)},{once:!0}):this._processConfig(e)},_processConfig(e){e.$init&&"function"==typeof e.$init&&(this._initCallbacks.push(e.$init),e.$init(),delete e.$init),Object.keys(e).forEach(t=>{const n=e[t];if(this._configs.set(t,c.cloneDeep(n)),n.init&&"function"==typeof n.init){const e=l(t);n.init.call(e,e)}const o=l(t);if(n.component){const e=this.initComponent(t,n.component,n.options||{});e&&this._components.set(t,e)}n.initial&&this.applyProperties(o,n.initial),n.events&&this.bindEvents(t,n.events,!0)})},update(e,t){const n=this._configs.get(e);if(!n)return this.process({[e]:t}),this._configs.get(e);const o=c.merge({},n,t);this._configs.set(e,o);const s=l(e);if(t.options&&this._components.has(e)){const n=this._components.get(e);n&&"function"==typeof n.setOptions&&n.setOptions(t.options)}return t.initial&&this.applyProperties(s,t.initial),t.events&&this.updateEvents(e,t.events),o},config(e){if(!e){const e={};return this._configs.forEach((t,n)=>{e[n]=t}),e}return this._configs.get(e)||null},getComponent(e){return e?this._components.get(e)||null:new Map(this._components)},reset(e){if(!e){return void Array.from(this._configs.keys()).forEach(e=>this.reset(e))}const t=this._components.get(e);t&&"function"==typeof t.destroy&&t.destroy(),this._components.delete(e),this.unbindEvents(e),this._configs.delete(e)},initComponent(e,t,n){const o={card:Y.card,modal:Y.modal,tabs:Y.tabs,accordion:Y.accordion,tooltip:Y.tooltip,carousel:Y.carousel,dropdown:Y.dropdown,badge:Y.badge,numberBadge:Y.numberBadge,listGroup:Y.listGroup,cookieConsent:Y.cookieConsent,backToTop:Y.backToTop,buttonGroup:Y.buttonGroup,loader:Y.loader,breadcrumbs:Y.breadcrumbs,navbar:Y.navbar,sidebar:Y.sidebar,footer:Y.footer,notification:Y.notification,timer:Y.timer,alarm:Y.alarm,autocomplete:Y.autocomplete,pillbox:Y.pillbox,signature:Y.signature,form:qo.create,breathe:Qo.breathe,pulse:Qo.pulse,scribe:Qo.scribe}[t];if(o){if("form"===t){if(!n.schema)return console.error("Forms component requires a schema option"),null;const t=o(n.schema,n.data||{},n);return t.renderTo(e),t}return o.call(Y,e,n)}console.warn(`Unknown component type: ${t}`)},applyProperties(e,t){Object.keys(t).forEach(n=>{"css"===n?e.css(t[n]):"text"===n?e.text(t[n]):"html"===n?e.html(t[n]):"addClass"===n?e.addClass(t[n]):"removeClass"===n?e.removeClass(t[n]):"toggleClass"===n?e.toggleClass(t[n]):"attr"===n&&Object.keys(t[n]).forEach(o=>{e.attr(o,t[n][o])})})},bindEvents(e,t,n=!1){const o=l(e);n&&!this._eventHandlers.has(e)&&this._eventHandlers.set(e,new Map),Object.keys(t).forEach(s=>{const i=t[s],r=e=>this.executeActions(e,i);o.on(s,r),n&&this._eventHandlers.get(e).set(s,r)})},unbindEvents(e){const t=this._eventHandlers.get(e);if(!t)return;const n=l(e);t.forEach((e,t)=>{n.off(t,e)}),this._eventHandlers.delete(e)},updateEvents(e,t){const n=this._eventHandlers.get(e),o=l(e);n&&Object.keys(t).forEach(e=>{n.has(e)&&(o.off(e,n.get(e)),n.delete(e))}),this.bindEvents(e,t,!0)},executeActions(e,t){if("function"==typeof t)return void t.call(e.target,e,l(e.target));const n=Array.isArray(t)?t:[t],o=l(e.target);n.forEach(t=>{if("function"==typeof t)return void t.call(e.target,e,o);const n=t.target?l(t.target):o;t.css&&n.css(t.css),t.text&&n.text(t.text),t.html&&n.html(t.html),t.addClass&&n.addClass(t.addClass),t.removeClass&&n.removeClass(t.removeClass),t.toggleClass&&n.toggleClass(t.toggleClass),t.log&&console.log(t.log)})},ready(e){"function"==typeof e?this._domReady||"complete"===document.readyState||"interactive"===document.readyState?e():document.addEventListener("DOMContentLoaded",()=>{this._domReady=!0,e()},{once:!0}):console.warn("ready() requires a function")}},ts=1e3,ns=6e4,os=36e5,ss=864e5,is=6048e5,rs=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],as=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],ls=["January","February","March","April","May","June","July","August","September","October","November","December"],ds=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];class cs{constructor(e){e instanceof cs?this._date=new Date(e._date):e instanceof Date?this._date=new Date(e):this._date="string"==typeof e||"number"==typeof e?new Date(e):null==e?new Date:new Date(e)}add(e,t){const n=this._normalizeUnit(t),o=this._date;return"years"===n?o.setFullYear(o.getFullYear()+e):"months"===n?o.setMonth(o.getMonth()+e):"weeks"===n?o.setDate(o.getDate()+7*e):"days"===n?o.setDate(o.getDate()+e):"hours"===n?o.setHours(o.getHours()+e):"minutes"===n?o.setMinutes(o.getMinutes()+e):"seconds"===n?o.setSeconds(o.getSeconds()+e):"milliseconds"===n&&o.setMilliseconds(o.getMilliseconds()+e),this}subtract(e,t){return this.add(-e,t)}startOf(e){const t=this._normalizeUnit(e),n=this._date;return"years"===t||"year"===t?(n.setMonth(0,1),n.setHours(0,0,0,0)):"months"===t||"month"===t?(n.setDate(1),n.setHours(0,0,0,0)):"weeks"===t||"week"===t?(n.setDate(n.getDate()-n.getDay()),n.setHours(0,0,0,0)):"days"===t||"day"===t?n.setHours(0,0,0,0):"hours"===t||"hour"===t?n.setMinutes(0,0,0):"minutes"===t||"minute"===t?n.setSeconds(0,0):"seconds"!==t&&"second"!==t||n.setMilliseconds(0),this}endOf(e){const t=this._normalizeUnit(e),n=this._date;return"years"===t||"year"===t?(n.setMonth(11,31),n.setHours(23,59,59,999)):"months"===t||"month"===t?(n.setMonth(n.getMonth()+1,0),n.setHours(23,59,59,999)):"weeks"===t||"week"===t?(n.setDate(n.getDate()+(6-n.getDay())),n.setHours(23,59,59,999)):"days"===t||"day"===t?n.setHours(23,59,59,999):"hours"===t||"hour"===t?n.setMinutes(59,59,999):"minutes"===t||"minute"===t?n.setSeconds(59,999):"seconds"!==t&&"second"!==t||n.setMilliseconds(999),this}set(e,t){const n=this._normalizeUnit(e),o=this._date;return"years"===n||"year"===n?o.setFullYear(t):"months"===n||"month"===n?o.setMonth(t):"days"===n||"day"===n||"date"===n?o.setDate(t):"hours"===n||"hour"===n?o.setHours(t):"minutes"===n||"minute"===n?o.setMinutes(t):"seconds"===n||"second"===n?o.setSeconds(t):"milliseconds"!==n&&"millisecond"!==n||o.setMilliseconds(t),this}get(e){if(!e)return this._date;const t=this._normalizeUnit(e),n=this._date;return"years"===t||"year"===t?n.getFullYear():"months"===t||"month"===t?n.getMonth():"days"===t||"day"===t?n.getDay():"date"===t?n.getDate():"hours"===t||"hour"===t?n.getHours():"minutes"===t||"minute"===t?n.getMinutes():"seconds"===t||"second"===t?n.getSeconds():"milliseconds"===t||"millisecond"===t?n.getMilliseconds():this._date}year(){return this._date.getFullYear()}month(){return this._date.getMonth()}date(){return this._date.getDate()}day(){return this._date.getDay()}hour(){return this._date.getHours()}minute(){return this._date.getMinutes()}second(){return this._date.getSeconds()}millisecond(){return this._date.getMilliseconds()}dayOfYear(){const e=new Date(this._date.getFullYear(),0,0),t=this._date-e;return Math.floor(t/864e5)}week(){const e=new Date(this._date.getFullYear(),0,1),t=this._date-e;return Math.ceil(t/6048e5+e.getDay()/7)}quarter(){return Math.floor(this._date.getMonth()/3)+1}unix(){return Math.floor(this._date.getTime()/1e3)}valueOf(){return this._date.getTime()}format(e="YYYY-MM-DD HH:mm:ss"){const t=this._date,n=t.getFullYear(),o=t.getMonth(),s=t.getDate(),i=t.getDay(),r=t.getHours(),a=t.getMinutes(),l=t.getSeconds(),d=t.getMilliseconds(),c=r%12||12,h=(e,t=2)=>String(e).padStart(t,"0"),u={YYYY:n,YY:String(n).slice(-2),MMMM:ls[o],MMM:ds[o],MM:h(o+1),M:o+1,dddd:rs[i],ddd:as[i],DD:h(s),D:s,HH:h(r),H:r,hh:h(c),h:c,mm:h(a),m:a,ss:h(l),s:l,SSS:h(d,3),A:r<12?"AM":"PM",a:r<12?"am":"pm"},p=Object.keys(u).sort((e,t)=>t.length-e.length),m=new RegExp(p.join("|"),"g");return e.replace(m,e=>u[e])}toISOString(){return this._date.toISOString()}toDate(){return new Date(this._date)}toString(){return this._date.toString()}fromNow(e){const t=e?new cs(e)._date:new Date,n=this._date.getTime()-t.getTime(),o=Math.abs(n),s=n<0;let i,r;return o<ns?"just now":(o<os?(i=Math.floor(o/ns),r=1===i?"minute":"minutes"):o<ss?(i=Math.floor(o/os),r=1===i?"hour":"hours"):o<is?(i=Math.floor(o/ss),r=1===i?"day":"days"):o<30*ss?(i=Math.floor(o/is),r=1===i?"week":"weeks"):o<365*ss?(i=Math.floor(o/(30*ss)),r=1===i?"month":"months"):(i=Math.floor(o/(365*ss)),r=1===i?"year":"years"),s?`${i} ${r} ago`:`in ${i} ${r}`)}to(e){const t=new cs(e)._date.getTime()-this._date.getTime(),n=Math.abs(t),o=t>0;let s,i;return n<ns?"just now":(n<os?(s=Math.floor(n/ns),i=1===s?"minute":"minutes"):n<ss?(s=Math.floor(n/os),i=1===s?"hour":"hours"):n<is?(s=Math.floor(n/ss),i=1===s?"day":"days"):n<30*ss?(s=Math.floor(n/is),i=1===s?"week":"weeks"):n<365*ss?(s=Math.floor(n/(30*ss)),i=1===s?"month":"months"):(s=Math.floor(n/(365*ss)),i=1===s?"year":"years"),o?`in ${s} ${i}`:`${s} ${i} ago`)}isBefore(e,t){const n=new cs(e);return t?this.clone().endOf(t).valueOf()<n.clone().startOf(t).valueOf():this._date.getTime()<n._date.getTime()}isAfter(e,t){const n=new cs(e);return t?this.clone().startOf(t).valueOf()>n.clone().endOf(t).valueOf():this._date.getTime()>n._date.getTime()}isSame(e,t){const n=new cs(e);if(!t)return this._date.getTime()===n._date.getTime();const o=this.clone().startOf(t).valueOf(),s=this.clone().endOf(t).valueOf(),i=n.valueOf();return i>=o&&i<=s}isBetween(e,t,n,o="()"){const s=new cs(e),i=new cs(t);let r,a,l;n?(r=s.clone().startOf(n).valueOf(),a=i.clone().endOf(n).valueOf(),l=this.clone().startOf(n).valueOf()):(r=s.valueOf(),a=i.valueOf(),l=this.valueOf());const d="["===o[0],c="]"===o[1];return(d?l>=r:l>r)&&(c?l<=a:l<a)}diff(e,t="milliseconds",n=!1){const o=new cs(e),s=this._date.getTime()-o._date.getTime(),i=this._normalizeUnit(t);let r;return r="milliseconds"===i?s:"seconds"===i?s/ts:"minutes"===i?s/ns:"hours"===i?s/os:"days"===i?s/ss:"weeks"===i?s/is:"months"===i?this._monthDiff(o):"years"===i?this._monthDiff(o)/12:s,n?r:Math.floor(r)}_monthDiff(e){const t=this._date,n=e._date;return 12*(t.getFullYear()-n.getFullYear())+(t.getMonth()-n.getMonth())}isValid(){return!isNaN(this._date.getTime())}isLeapYear(){const e=this._date.getFullYear();return e%4==0&&e%100!=0||e%400==0}daysInMonth(){return new Date(this._date.getFullYear(),this._date.getMonth()+1,0).getDate()}clone(){return new cs(this._date)}_normalizeUnit(e){if(!e)return e;const t=String(e).toLowerCase().trim();return"year"===t?"years":"month"===t?"months":"week"===t?"weeks":"day"===t?"days":"hour"===t?"hours":"minute"===t?"minutes":"second"===t?"seconds":"millisecond"===t?"milliseconds":t}}const hs=function(e){return new cs(e)};Object.assign(hs,{now:()=>Date.now(),parse(e,t){if(!t)return new cs(e);const n={YYYY:{regex:"(\\d{4})",setter:"year"},YY:{regex:"(\\d{2})",setter:"year",transform:e=>2e3+parseInt(e)},MM:{regex:"(\\d{2})",setter:"month",transform:e=>parseInt(e)-1},M:{regex:"(\\d{1,2})",setter:"month",transform:e=>parseInt(e)-1},DD:{regex:"(\\d{2})",setter:"date"},D:{regex:"(\\d{1,2})",setter:"date"},HH:{regex:"(\\d{2})",setter:"hour"},H:{regex:"(\\d{1,2})",setter:"hour"},mm:{regex:"(\\d{2})",setter:"minute"},m:{regex:"(\\d{1,2})",setter:"minute"},ss:{regex:"(\\d{2})",setter:"second"},s:{regex:"(\\d{1,2})",setter:"second"}};let o=t;const s=[],i=Object.keys(n).sort((e,t)=>t.length-e.length);for(const e of i)if(t.includes(e)){-1!==o.indexOf(e)&&(o=o.replace(e,n[e].regex),s.push({token:e,...n[e]}))}o=o.replace(/[-\/\\^$*+?.()|[\]{}]/g,e=>"("===e||")"===e?e:"\\"+e);try{const t=new RegExp("^"+o+"$"),n=e.match(t);if(!n)return new cs(NaN);const i=new cs;i.set("hour",0).set("minute",0).set("second",0).set("millisecond",0);for(let e=0;e<s.length;e++){let t=parseInt(n[e+1]);s[e].transform&&(t=s[e].transform(n[e+1])),i.set(s[e].setter,t)}return i}catch(e){return new cs(NaN)}},isValid:e=>new cs(e).isValid(),min(...e){const t=e.flat().map(e=>new cs(e));let n=t[0];for(let e=1;e<t.length;e++)t[e].valueOf()<n.valueOf()&&(n=t[e]);return n},max(...e){const t=e.flat().map(e=>new cs(e));let n=t[0];for(let e=1;e<t.length;e++)t[e].valueOf()>n.valueOf()&&(n=t[e]);return n},tokens:{YYYY:"Full year (2025)",YY:"Short year (25)",MM:"Month 01-12",M:"Month 1-12",DD:"Day 01-31",D:"Day 1-31",HH:"Hour 00-23",H:"Hour 0-23",hh:"Hour 01-12",h:"Hour 1-12",mm:"Minute 00-59",m:"Minute 0-59",ss:"Second 00-59",s:"Second 0-59",SSS:"Milliseconds",A:"AM/PM",a:"am/pm",ddd:"Day name short (Mon)",dddd:"Day name full (Monday)",MMM:"Month name short (Jan)",MMMM:"Month name full (January)"}});const us={"arrow-up":{viewBox:"0 0 24 24",path:"M12 19V5M5 12l7-7 7 7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"arrow-down":{viewBox:"0 0 24 24",path:"M12 5v14M19 12l-7 7-7-7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"arrow-left":{viewBox:"0 0 24 24",path:"M19 12H5M12 19l-7-7 7-7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"arrow-right":{viewBox:"0 0 24 24",path:"M5 12h14M12 5l7 7-7 7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"arrow-up-left":{viewBox:"0 0 24 24",path:"M17 17L7 7M7 17V7h10",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"arrow-up-right":{viewBox:"0 0 24 24",path:"M7 17L17 7M7 7h10v10",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"arrow-down-left":{viewBox:"0 0 24 24",path:"M17 7L7 17M17 17H7V7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"arrow-down-right":{viewBox:"0 0 24 24",path:"M7 7l10 10M17 7v10H7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},menu:{viewBox:"0 0 24 24",paths:["M3 6h18","M3 12h18","M3 18h18"],stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round"},"menu-alt":{viewBox:"0 0 24 24",paths:["M3 6h18","M3 12h12","M3 18h18"],stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round"},"dots-horizontal":{viewBox:"0 0 24 24",paths:["M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0","M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0","M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"],fill:"currentColor"},"dots-vertical":{viewBox:"0 0 24 24",paths:["M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0","M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0","M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"],fill:"currentColor"},grid:{viewBox:"0 0 24 24",path:"M3 3h7v7H3zM14 3h7v7h-7zM14 14h7v7h-7zM3 14h7v7H3z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},list:{viewBox:"0 0 24 24",paths:["M8 6h13","M8 12h13","M8 18h13","M3 6h.01","M3 12h.01","M3 18h.01"],stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},columns:{viewBox:"0 0 24 24",path:"M12 3v18M3 3h18v18H3V3z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},layout:{viewBox:"0 0 24 24",path:"M4 3h16a1 1 0 011 1v16a1 1 0 01-1 1H4a1 1 0 01-1-1V4a1 1 0 011-1zM9 21V9m12-6H3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},close:{viewBox:"0 0 24 24",path:"M18 6L6 18M6 6l12 12",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},plus:{viewBox:"0 0 24 24",path:"M12 5v14M5 12h14",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},minus:{viewBox:"0 0 24 24",path:"M5 12h14",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"plus-circle":{viewBox:"0 0 24 24",path:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10zM12 8v8M8 12h8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"minus-circle":{viewBox:"0 0 24 24",path:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10zM8 12h8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"plus-square":{viewBox:"0 0 24 24",path:"M5 3h14a2 2 0 012 2v14a2 2 0 01-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2zM12 8v8M8 12h8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"minus-square":{viewBox:"0 0 24 24",path:"M5 3h14a2 2 0 012 2v14a2 2 0 01-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2zM8 12h8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},search:{viewBox:"0 0 24 24",path:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},refresh:{viewBox:"0 0 24 24",path:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},edit:{viewBox:"0 0 24 24",path:"M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"edit-2":{viewBox:"0 0 24 24",path:"M17 3a2.85 2.85 0 114 4L7.5 20.5 2 22l1.5-5.5z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"edit-3":{viewBox:"0 0 24 24",path:"M12 20h9M16.5 3.5a2.121 2.121 0 013 3L7 19l-4 1 1-4z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},trash:{viewBox:"0 0 24 24",path:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filter:{viewBox:"0 0 24 24",path:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},sort:{viewBox:"0 0 24 24",paths:["M3 6h7","M3 12h5","M3 18h3","M16 6l4 4-4 4","M20 10H10"],stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},home:{viewBox:"0 0 24 24",path:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},user:{viewBox:"0 0 24 24",path:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},users:{viewBox:"0 0 24 24",path:"M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2M9 11a4 4 0 100-8 4 4 0 000 8zM23 21v-2a4 4 0 00-3-3.87M16 3.13a4 4 0 010 7.75",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},settings:{viewBox:"0 0 24 24",path:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065zM15 12a3 3 0 11-6 0 3 3 0 016 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},cog:{viewBox:"0 0 24 24",path:"M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},tool:{viewBox:"0 0 24 24",path:"M14.7 6.3a1 1 0 000 1.4l1.6 1.6a1 1 0 001.4 0l3.77-3.77a6 6 0 01-7.94 7.94l-6.91 6.91a2.12 2.12 0 01-3-3l6.91-6.91a6 6 0 017.94-7.94l-3.76 3.76z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},eye:{viewBox:"0 0 24 24",path:"M15 12a3 3 0 11-6 0 3 3 0 016 0z M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"eye-off":{viewBox:"0 0 24 24",path:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},lock:{viewBox:"0 0 24 24",path:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},unlock:{viewBox:"0 0 24 24",path:"M8 11V7a4 4 0 118 0m-4 8v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},clock:{viewBox:"0 0 24 24",path:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},calendar:{viewBox:"0 0 24 24",path:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},star:{viewBox:"0 0 24 24",path:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"star-filled":{viewBox:"0 0 24 24",path:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z",fill:"currentColor"},sun:{viewBox:"0 0 24 24",path:"M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},moon:{viewBox:"0 0 24 24",path:"M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},globe:{viewBox:"0 0 24 24",path:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},map:{viewBox:"0 0 24 24",path:"M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},pin:{viewBox:"0 0 24 24",path:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z M15 11a3 3 0 11-6 0 3 3 0 016 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},feather:{viewBox:"0 0 24 24",path:"M20.24 12.24a6 6 0 00-8.49-8.49L5 10.5V19h8.5zM16 8L2 22M17.5 15H9",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},palette:{viewBox:"0 0 24 24",path:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10c.93 0 1.68-.75 1.68-1.68 0-.43-.16-.84-.44-1.13-.27-.29-.43-.7-.43-1.13 0-.93.76-1.69 1.69-1.69h1.98c3.03 0 5.52-2.49 5.52-5.52C22 6.48 17.52 2 12 2zm-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 8 6.5 8 8 8.67 8 9.5 7.33 11 6.5 11zm3-4C8.67 7 8 6.33 8 5.5S8.67 4 9.5 4s1.5.67 1.5 1.5S10.33 7 9.5 7zm5 0c-.83 0-1.5-.67-1.5-1.5S13.67 4 14.5 4s1.5.67 1.5 1.5S15.33 7 14.5 7zm3 4c-.83 0-1.5-.67-1.5-1.5S16.67 8 17.5 8s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z",fill:"currentColor"},type:{viewBox:"0 0 24 24",path:"M4 7V4h16v3M9 20h6M12 4v16",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},square:{viewBox:"0 0 24 24",path:"M5 3h14a2 2 0 012 2v14a2 2 0 01-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"mouse-pointer":{viewBox:"0 0 24 24",path:"M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z M13 13l6 6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"refresh-cw":{viewBox:"0 0 24 24",path:"M23 4v6h-6M1 20v-6h6M3.51 9a9 9 0 0114.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0020.49 15",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},sync:{viewBox:"0 0 24 24",path:"M1 4v6h6m16 10v-6h-6M2 20l6-6M22 4l-6 6M9 12l2 2 4-4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},gauge:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 0110 10c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2z M8 12l4 4 4-4M12 16V8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"map-pin":{viewBox:"0 0 24 24",path:"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0118 0z M12 13a3 3 0 100-6 3 3 0 000 6z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"help-circle":{viewBox:"0 0 24 24",path:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z M9.09 9a3 3 0 015.83 1c0 2-3 3-3 3 M12 17h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},sliders:{viewBox:"0 0 24 24",path:"M4 21v-7m0-4V3m8 18v-9m0-4V3m8 18v-5m0-4V3M1 14h6m2-6h6m2 8h6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"user-check":{viewBox:"0 0 24 24",path:"M16 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2m16-13l2 2 4-4M13 7a4 4 0 11-8 0 4 4 0 018 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},component:{viewBox:"0 0 24 24",path:"M21 16V8a2 2 0 00-1-1.73l-7-4a2 2 0 00-2 0l-7 4A2 2 0 003 8v8a2 2 0 001 1.73l7 4a2 2 0 002 0l7-4A2 2 0 0021 16zM3.27 6.96L12 12.01l8.73-5.05M12 22.08V12",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},phone:{viewBox:"0 0 24 24",path:"M22 16.92v3a2 2 0 01-2.18 2 19.79 19.79 0 01-8.63-3.07A19.5 19.5 0 013.07 9.8a19.79 19.79 0 01-3.07-8.64A2 2 0 012 .18h3a2 2 0 012 1.72 12.84 12.84 0 00.7 2.81 2 2 0 01-.45 2.11L6.09 7.91a16 16 0 006 6l1.27-1.27a2 2 0 012.11-.45 12.84 12.84 0 002.81.7A2 2 0 0122 14v2.92z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},mail:{viewBox:"0 0 24 24",path:"M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z M22 6l-10 7L2 6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},briefcase:{viewBox:"0 0 24 24",path:"M20 7H4a2 2 0 00-2 2v10a2 2 0 002 2h16a2 2 0 002-2V9a2 2 0 00-2-2z M16 7V5a2 2 0 00-2-2h-4a2 2 0 00-2 2v2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},building:{viewBox:"0 0 24 24",path:"M3 21h18 M5 21V5a2 2 0 012-2h10a2 2 0 012 2v16 M9 9h2 M9 13h2 M9 17h2 M13 9h2 M13 13h2 M13 17h2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"link-2":{viewBox:"0 0 24 24",path:"M15 7h3a5 5 0 015 5 5 5 0 01-5 5h-3m-6 0H6a5 5 0 01-5-5 5 5 0 015-5h3 M8 12h8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"at-sign":{viewBox:"0 0 24 24",path:"M16 12a4 4 0 11-8 0 4 4 0 018 0z M16 8v5a3 3 0 006 0v-1a10 10 0 10-3.92 7.94",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},heart:{viewBox:"0 0 24 24",path:"M20.84 4.61a5.5 5.5 0 00-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 00-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 000-7.78z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"heart-filled":{viewBox:"0 0 24 24",path:"M20.84 4.61a5.5 5.5 0 00-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 00-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 000-7.78z",stroke:"currentColor",fill:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},cake:{viewBox:"0 0 24 24",path:"M20 21H4a2 2 0 01-2-2v-4a2 2 0 012-2h16a2 2 0 012 2v4a2 2 0 01-2 2z M8 13V9 M12 13V9 M16 13V9 M8 9a1 1 0 010-2 1 1 0 010 2z M12 9a1 1 0 010-2 1 1 0 010 2z M16 9a1 1 0 010-2 1 1 0 010 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},sidebar:{viewBox:"0 0 24 24",path:"M19 3H5a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2V5a2 2 0 00-2-2z M9 3v18",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},window:{viewBox:"0 0 24 24",path:"M20 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V6a2 2 0 00-2-2z M2 9h20 M5.5 6.5h.01 M8 6.5h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}},ps={mail:{viewBox:"0 0 24 24",path:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"mail-open":{viewBox:"0 0 24 24",path:"M3 19V9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v10a2 2 0 01-2 2H5a2 2 0 01-2-2z M3 9l9 6 9-6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},inbox:{viewBox:"0 0 24 24",path:"M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},send:{viewBox:"0 0 24 24",path:"M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},phone:{viewBox:"0 0 24 24",path:"M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"phone-incoming":{viewBox:"0 0 24 24",path:"M14.5 2v6m0 0h6m-6 0l7-7M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"phone-outgoing":{viewBox:"0 0 24 24",path:"M21.5 2h-6m6 0v6m0-6l-7 7M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"phone-off":{viewBox:"0 0 24 24",path:"M16.5 10.5l5.5-5.5M22 5l-5.5 5.5M10.68 13.31a16 16 0 003.41 2.6l1.27-1.27a2 2 0 012.11-.45 12.84 12.84 0 002.81.7 2 2 0 011.72 2v3a2 2 0 01-2.18 2 19.79 19.79 0 01-8.63-3.07 19.42 19.42 0 01-6-6 19.79 19.79 0 01-3.07-8.67A2 2 0 014.11 2h3a2 2 0 012 1.72 12.84 12.84 0 00.7 2.81 2 2 0 01-.45 2.11L8.09 9.91",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},chat:{viewBox:"0 0 24 24",path:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"chat-alt":{viewBox:"0 0 24 24",path:"M17 8h2a2 2 0 012 2v6a2 2 0 01-2 2h-2v4l-4-4H9a1.994 1.994 0 01-1.414-.586m0 0L11 14h4a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2v4l.586-.586z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"message-circle":{viewBox:"0 0 24 24",path:"M21 11.5a8.38 8.38 0 01-.9 3.8 8.5 8.5 0 01-7.6 4.7 8.38 8.38 0 01-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 01-.9-3.8 8.5 8.5 0 014.7-7.6 8.38 8.38 0 013.8-.9h.5a8.48 8.48 0 018 8v.5z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"message-square":{viewBox:"0 0 24 24",path:"M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},bell:{viewBox:"0 0 24 24",path:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"bell-off":{viewBox:"0 0 24 24",path:"M13.73 21a2 2 0 01-3.46 0M18.63 13A17.89 17.89 0 0118 8M6.26 6.26A5.86 5.86 0 006 8c0 7-3 9-3 9h14M18 8a6 6 0 00-9.33-5M1 1l22 22",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},notification:{viewBox:"0 0 24 24",path:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2zm6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5v6z",fill:"currentColor"},"at-sign":{viewBox:"0 0 24 24",path:"M16 12a4 4 0 10-8 0 4 4 0 008 0zm0 0v1.5a2.5 2.5 0 005 0V12a9 9 0 10-9 9",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},paperclip:{viewBox:"0 0 24 24",path:"M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},rss:{viewBox:"0 0 24 24",path:"M4 11a9 9 0 0 1 9 9M4 4a16 16 0 0116 16M5 20a1 1 0 100-2 1 1 0 000 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},wifi:{viewBox:"0 0 24 24",path:"M12 20h.01M2 8.82a15 15 0 0120 0M5 12.859a10 10 0 0114 0M8.5 16.429a5 5 0 017 0",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"wifi-off":{viewBox:"0 0 24 24",path:"M1 1l22 22M16.72 11.06A10.94 10.94 0 0119 12.55M5 12.55a10.94 10.94 0 015.17-2.39m3.64.46a10.88 10.88 0 012.69 1.92M8.5 16.429a5 5 0 013.5-1.43M12 20h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}},ms={play:{viewBox:"0 0 24 24",path:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z M21 12a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"play-filled":{viewBox:"0 0 24 24",path:"M5 3l14 9-14 9V3z",fill:"currentColor"},pause:{viewBox:"0 0 24 24",path:"M10 9v6m4-6v6m7-3a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"pause-filled":{viewBox:"0 0 24 24",paths:["M6 4h4v16H6z","M14 4h4v16h-4z"],fill:"currentColor"},stop:{viewBox:"0 0 24 24",path:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z M9 10a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-4z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"stop-filled":{viewBox:"0 0 24 24",path:"M6 6h12v12H6z",fill:"currentColor"},"skip-back":{viewBox:"0 0 24 24",path:"M19 20L9 12l10-8v16zM5 19V5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"skip-forward":{viewBox:"0 0 24 24",path:"M5 4l10 8-10 8V4zM19 5v14",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},rewind:{viewBox:"0 0 24 24",path:"M11 19l-7-7 7-7m8 14l-7-7 7-7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"fast-forward":{viewBox:"0 0 24 24",path:"M13 5l7 7-7 7M5 5l7 7-7 7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},volume:{viewBox:"0 0 24 24",path:"M15.536 8.464a5 5 0 010 7.072M12 6l-4 4H4v4h4l4 4V6z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"volume-up":{viewBox:"0 0 24 24",path:"M15.536 8.464a5 5 0 010 7.072m2.828-9.9a9 9 0 010 12.728M12 6l-4 4H4v4h4l4 4V6z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"volume-down":{viewBox:"0 0 24 24",path:"M15.536 8.464a5 5 0 010 7.072M12 6l-4 4H4v4h4l4 4V6z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"volume-mute":{viewBox:"0 0 24 24",path:"M5.586 15H4a1 1 0 01-1-1v-4a1 1 0 011-1h1.586l4.707-4.707C10.923 3.663 12 4.109 12 5v14c0 .891-1.077 1.337-1.707.707L5.586 15z M17 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"volume-off":{viewBox:"0 0 24 24",path:"M12 6l-4 4H4v4h4l4 4V6z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},camera:{viewBox:"0 0 24 24",path:"M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z M15 13a3 3 0 11-6 0 3 3 0 016 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"camera-off":{viewBox:"0 0 24 24",path:"M1 1l22 22M21 21H3a2 2 0 01-2-2V8a2 2 0 012-2h3m3-3h6l2 3h4a2 2 0 012 2v9.34m-7.72-2.06a4 4 0 11-5.56-5.56",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},video:{viewBox:"0 0 24 24",path:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"video-off":{viewBox:"0 0 24 24",path:"M16 16v1a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h2m5.66 0H14a2 2 0 012 2v3.34l1 1L23 7v10M1 1l22 22",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},image:{viewBox:"0 0 24 24",path:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},images:{viewBox:"0 0 24 24",path:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z M9 3h12a2 2 0 012 2v12",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},music:{viewBox:"0 0 24 24",path:"M9 19V6l12-3v13M9 19c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zm12-3c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zM9 10l12-3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},mic:{viewBox:"0 0 24 24",path:"M19 10v2a7 7 0 01-14 0v-2m7 9v4m-4 0h8m-4-13a3 3 0 00-3 3v4a3 3 0 006 0v-4a3 3 0 00-3-3z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"mic-off":{viewBox:"0 0 24 24",path:"M1 1l22 22m-2-2a10 10 0 01-11 2.955M12 19v4m-4 0h8M9 9v3a3 3 0 005.12 2.12M15 9.34V4a3 3 0 00-5.94-.6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},headphones:{viewBox:"0 0 24 24",path:"M3 18v-6a9 9 0 0118 0v6M21 19a2 2 0 01-2 2h-1a2 2 0 01-2-2v-3a2 2 0 012-2h3zM3 19a2 2 0 002 2h1a2 2 0 002-2v-3a2 2 0 00-2-2H3z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},radio:{viewBox:"0 0 24 24",path:"M12 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0 M16.24 7.76a6 6 0 010 8.49m-8.48-.01a6 6 0 010-8.49m11.31-2.82a10 10 0 010 14.14m-14.14 0a10 10 0 010-14.14",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},film:{viewBox:"0 0 24 24",path:"M7 4v16M17 4v16M3 8h4m10 0h4M3 12h18M3 16h4m10 0h4M4 20h16a1 1 0 001-1V5a1 1 0 00-1-1H4a1 1 0 00-1 1v14a1 1 0 001 1z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},tv:{viewBox:"0 0 24 24",path:"M20 7H4a2 2 0 00-2 2v10a2 2 0 002 2h16a2 2 0 002-2V9a2 2 0 00-2-2zM17 3l-5 4-5-4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},cast:{viewBox:"0 0 24 24",path:"M2 16.1A5 5 0 015.9 20M2 12.05A9 9 0 019.95 20M2 8V6a2 2 0 012-2h16a2 2 0 012 2v12a2 2 0 01-2 2h-6M2 20h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},maximise:{viewBox:"0 0 24 24",path:"M8 3H5a2 2 0 00-2 2v3m18 0V5a2 2 0 00-2-2h-3m0 18h3a2 2 0 002-2v-3M3 16v3a2 2 0 002 2h3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},minimise:{viewBox:"0 0 24 24",path:"M8 3v3a2 2 0 01-2 2H3m18 0h-3a2 2 0 01-2-2V3m0 18v-3a2 2 0 012-2h3M3 16h3a2 2 0 012 2v3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},maximize:{viewBox:"0 0 24 24",path:"M8 3H5a2 2 0 00-2 2v3m18 0V5a2 2 0 00-2-2h-3m0 18h3a2 2 0 002-2v-3M3 16v3a2 2 0 002 2h3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},minimize:{viewBox:"0 0 24 24",path:"M8 3v3a2 2 0 01-2 2H3m18 0h-3a2 2 0 01-2-2V3m0 18v-3a2 2 0 012-2h3M3 16h3a2 2 0 012 2v3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"maximise-2":{viewBox:"0 0 24 24",path:"M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"minimise-2":{viewBox:"0 0 24 24",path:"M4 14h6v6M20 10h-6V4M14 10l7-7M3 21l7-7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"maximize-2":{viewBox:"0 0 24 24",path:"M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"minimize-2":{viewBox:"0 0 24 24",path:"M4 14h6v6M20 10h-6V4M14 10l7-7M3 21l7-7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},scissors:{viewBox:"0 0 24 24",path:"M6 9a3 3 0 100-6 3 3 0 000 6zM6 21a3 3 0 100-6 3 3 0 000 6zM20 4L8.12 15.88M14.47 14.48L20 20M8.12 8.12L12 12",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"play-circle":{viewBox:"0 0 24 24",path:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z M10 8l6 4-6 4V8z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}},fs={document:{viewBox:"0 0 24 24",path:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"document-text":{viewBox:"0 0 24 24",path:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z M14 2v6h6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"document-add":{viewBox:"0 0 24 24",path:"M9 13h6m-3-3v6m5 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"document-remove":{viewBox:"0 0 24 24",path:"M9 13h6m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"document-check":{viewBox:"0 0 24 24",path:"M9 12l2 2 4-4m2 11H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},folder:{viewBox:"0 0 24 24",path:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"folder-open":{viewBox:"0 0 24 24",path:"M5 19a2 2 0 01-2-2V7a2 2 0 012-2h4l2 2h6a2 2 0 012 2v1M5 19h14a2 2 0 002-2v-5a2 2 0 00-2-2H9a2 2 0 00-2 2v5a2 2 0 01-2 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"folder-add":{viewBox:"0 0 24 24",path:"M9 13h6m-3-3v6M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"folder-remove":{viewBox:"0 0 24 24",path:"M9 13h6M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},download:{viewBox:"0 0 24 24",path:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},upload:{viewBox:"0 0 24 24",path:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"cloud-download":{viewBox:"0 0 24 24",path:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M9 19l3 3m0 0l3-3m-3 3V10",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"cloud-upload":{viewBox:"0 0 24 24",path:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},cloud:{viewBox:"0 0 24 24",path:"M8 19c-3.314 0-6-2.462-6-5.5S4.686 8 8 8c.642-2.87 3.251-5 6.375-5C18.086 3 21 5.91 21 9.5a6.458 6.458 0 01-.705 2.945A4.5 4.5 0 0119 21H8z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},attachment:{viewBox:"0 0 24 24",path:"M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},copy:{viewBox:"0 0 24 24",path:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},clipboard:{viewBox:"0 0 24 24",path:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"clipboard-check":{viewBox:"0 0 24 24",path:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"clipboard-list":{viewBox:"0 0 24 24",path:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},save:{viewBox:"0 0 24 24",path:"M8 7H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-3m-1 4l-3 3m0 0l-3-3m3 3V4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},archive:{viewBox:"0 0 24 24",path:"M5 8h14M5 8a2 2 0 110-4h14a2 2 0 110 4M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8m-9 4h4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"file-code":{viewBox:"0 0 24 24",path:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"file-zip":{viewBox:"0 0 24 24",path:"M17 21H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2zM10 3v4h1V3h-1zm1 4h-1v2h1V7zm-1 2v2h1V9h-1zm1 2h-1v2h1v-2zm-1 2v2h1v-2h-1z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},database:{viewBox:"0 0 24 24",path:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},server:{viewBox:"0 0 24 24",path:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"hard-drive":{viewBox:"0 0 24 24",path:"M22 12H2M5.45 5.11L2 12v6a2 2 0 002 2h16a2 2 0 002-2v-6l-3.45-6.89A2 2 0 0016.76 4H7.24a2 2 0 00-1.79 1.11zM6 16h.01M10 16h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"file-text":{viewBox:"0 0 24 24",path:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8l-6-6zM14 2v6h6M16 13H8M16 17H8M10 9H8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},book:{viewBox:"0 0 24 24",path:"M4 19.5A2.5 2.5 0 016.5 17H20M4 19.5A2.5 2.5 0 006.5 22H20v-5M6 3h14v16H6a2 2 0 01-2-2V5a2 2 0 012-2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"book-open":{viewBox:"0 0 24 24",path:"M2 3h6a4 4 0 014 4v14a3 3 0 00-3-3H2V3zM22 3h-6a4 4 0 00-4 4v14a3 3 0 013-3h7V3z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"book-closed":{viewBox:"0 0 24 24",path:"M4 19.5A2.5 2.5 0 016.5 17H20M4 19.5A2.5 2.5 0 006.5 22H20v-5M6 3h14v16H6a2 2 0 01-2-2V5a2 2 0 012-2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"folder-plus":{viewBox:"0 0 24 24",path:"M9 13h6m-3-3v6M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"folder-minus":{viewBox:"0 0 24 24",path:"M9 13h6M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}},gs={share:{viewBox:"0 0 24 24",path:"M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.368 2.684 3 3 0 00-5.368-2.684z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"share-alt":{viewBox:"0 0 24 24",path:"M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},heart:{viewBox:"0 0 24 24",path:"M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"heart-filled":{viewBox:"0 0 24 24",path:"M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z",fill:"currentColor"},bookmark:{viewBox:"0 0 24 24",path:"M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"bookmark-filled":{viewBox:"0 0 24 24",path:"M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z",fill:"currentColor"},"thumb-up":{viewBox:"0 0 24 24",path:"M14 10h4.764a2 2 0 011.789 2.894l-3.5 7A2 2 0 0115.263 21h-4.017c-.163 0-.326-.02-.485-.06L7 20m7-10V5a2 2 0 00-2-2h-.095c-.5 0-.905.405-.905.905 0 .714-.211 1.412-.608 2.006L7 11v9m7-10h-2M7 20H5a2 2 0 01-2-2v-6a2 2 0 012-2h2.5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"thumb-down":{viewBox:"0 0 24 24",path:"M10 14H5.236a2 2 0 01-1.789-2.894l3.5-7A2 2 0 018.736 3h4.018a2 2 0 01.485.06l3.76.94m-7 10v5a2 2 0 002 2h.096c.5 0 .905-.405.905-.904 0-.715.211-1.413.608-2.008L17 13V4m-7 10h2m5-10h2a2 2 0 012 2v6a2 2 0 01-2 2h-2.5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},comment:{viewBox:"0 0 24 24",path:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"user-add":{viewBox:"0 0 24 24",path:"M18 9v3m0 0v3m0-3h3m-3 0h-3m-2-5a4 4 0 11-8 0 4 4 0 018 0zM3 20a6 6 0 0112 0v1H3v-1z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"user-plus":{viewBox:"0 0 24 24",path:"M18 9v3m0 0v3m0-3h3m-3 0h-3m-2-5a4 4 0 11-8 0 4 4 0 018 0zM3 20a6 6 0 0112 0v1H3v-1z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"user-remove":{viewBox:"0 0 24 24",path:"M13 7a4 4 0 11-8 0 4 4 0 018 0zM9 14a6 6 0 00-6 6v1h12v-1a6 6 0 00-6-6zM21 12h-6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"user-group":{viewBox:"0 0 24 24",path:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"emoji-happy":{viewBox:"0 0 24 24",path:"M14.828 14.828a4 4 0 01-5.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"emoji-sad":{viewBox:"0 0 24 24",path:"M9.172 16.172a4 4 0 015.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},flag:{viewBox:"0 0 24 24",path:"M3 21v-4m0 0V5a2 2 0 012-2h6.5l1 1H21l-3 6 3 6h-8.5l-1-1H5a2 2 0 00-2 2zm9-13.5V9",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},award:{viewBox:"0 0 24 24",path:"M9 12l2 2 4-4M7.835 4.697a3.42 3.42 0 001.946-.806 3.42 3.42 0 014.438 0 3.42 3.42 0 001.946.806 3.42 3.42 0 013.138 3.138 3.42 3.42 0 00.806 1.946 3.42 3.42 0 010 4.438 3.42 3.42 0 00-.806 1.946 3.42 3.42 0 01-3.138 3.138 3.42 3.42 0 00-1.946.806 3.42 3.42 0 01-4.438 0 3.42 3.42 0 00-1.946-.806 3.42 3.42 0 01-3.138-3.138 3.42 3.42 0 00-.806-1.946 3.42 3.42 0 010-4.438 3.42 3.42 0 00.806-1.946 3.42 3.42 0 013.138-3.138z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},trophy:{viewBox:"0 0 24 24",path:"M12 15V17M8 21H16M8 3H16V9C16 11.2091 14.2091 13 12 13C9.79086 13 8 11.2091 8 9V3ZM16 5H18C19.1046 5 20 5.89543 20 7V8C20 9.10457 19.1046 10 18 10H16M8 5H6C4.89543 5 4 5.89543 4 7V8C4 9.10457 4.89543 10 6 10H8M12 17V21",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},gift:{viewBox:"0 0 24 24",path:"M12 8V21M12 8H8.464C7.103 8 6 6.897 6 5.536C6 4.175 7.103 3 8.464 3C10.059 3 11.162 4.162 12 5.536M12 8H15.536C16.897 8 18 6.897 18 5.536C18 4.175 16.897 3 15.536 3C13.941 3 12.838 4.162 12 5.536M20 12V21H4V12M3 8H21V12H3V8Z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},sparkles:{viewBox:"0 0 24 24",path:"M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},fire:{viewBox:"0 0 24 24",path:"M17.657 18.657A8 8 0 016.343 7.343S7 9 9 10c0-2 .5-5 2.986-7C14 5 16.09 5.777 17.656 7.343A7.975 7.975 0 0120 13a7.975 7.975 0 01-2.343 5.657z M9.879 16.121A3 3 0 1012.015 11L11 14H9c0 .768.293 1.536.879 2.121z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},github:{viewBox:"0 0 24 24",path:"M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z",fill:"currentColor"},twitter:{viewBox:"0 0 24 24",path:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z",fill:"currentColor"},linkedin:{viewBox:"0 0 24 24",path:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 01-2.063-2.065 2.064 2.064 0 112.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z",fill:"currentColor"},youtube:{viewBox:"0 0 24 24",path:"M23.498 6.186a3.016 3.016 0 00-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 00.502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 002.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 002.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z",fill:"currentColor"},"share-2":{viewBox:"0 0 24 24",path:"M18 8a3 3 0 100-6 3 3 0 000 6zM6 15a3 3 0 100-6 3 3 0 000 6zM18 22a3 3 0 100-6 3 3 0 000 6zM8.59 13.51l6.83 3.98M15.41 6.51l-6.82 3.98",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},facebook:{viewBox:"0 0 24 24",path:"M18 2h-3a5 5 0 00-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 011-1h3z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},instagram:{viewBox:"0 0 24 24",path:"M2 7a5 5 0 015-5h10a5 5 0 015 5v10a5 5 0 01-5 5H7a5 5 0 01-5-5zM16 11.37A4 4 0 1112.63 8 4 4 0 0116 11.37zM17.5 6.5h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}},vs={cart:{viewBox:"0 0 24 24",path:"M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"cart-add":{viewBox:"0 0 24 24",path:"M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0zm6-8v-2m0 0V7m0 2h2m-2 0H11",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"shopping-bag":{viewBox:"0 0 24 24",path:"M16 11V7a4 4 0 00-8 0v4M5 9h14l1 12H4L5 9z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},store:{viewBox:"0 0 24 24",path:"M3 3h18v4H3V3zM3 7v12a2 2 0 002 2h14a2 2 0 002-2V7M3 11h18M12 7v14M8 11v10M16 11v10",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"credit-card":{viewBox:"0 0 24 24",path:"M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},wallet:{viewBox:"0 0 24 24",path:"M17 9V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-2m-5-3h9m0 0l-3-3m3 3l-3 3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},cash:{viewBox:"0 0 24 24",path:"M17 9V7a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2m2 4h10a2 2 0 002-2v-6a2 2 0 00-2-2H9a2 2 0 00-2 2v6a2 2 0 002 2zm7-5a2 2 0 11-4 0 2 2 0 014 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"currency-dollar":{viewBox:"0 0 24 24",path:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"currency-pound":{viewBox:"0 0 24 24",path:"M15 9a3 3 0 00-3-3H9a3 3 0 00-3 3v6a3 3 0 003 3h6a3 3 0 003-3M9 12h6M21 12a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"currency-euro":{viewBox:"0 0 24 24",path:"M15 9a3 3 0 00-3-3H9a3 3 0 00-3 3v6a3 3 0 003 3h3a3 3 0 003-3M7 10h5m-5 4h5M21 12a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},tag:{viewBox:"0 0 24 24",path:"M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},tags:{viewBox:"0 0 24 24",path:"M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z M17 17l4.414-4.414a2 2 0 000-2.828L14 3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},receipt:{viewBox:"0 0 24 24",path:"M9 14l6 0M9 10l6 0M9 18l3 0M5 21l1-2 1 2 1-2 1 2 1-2 1 2 1-2 1 2 1-2 1 2 1-2 1 2V3l-1 2-1-2-1 2-1-2-1 2-1-2-1 2-1-2-1 2-1-2-1 2-1-2v18z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},barcode:{viewBox:"0 0 24 24",path:"M5 7v10M8 7v10M11 7v10M14 7v10M19 7v10M17 7v10",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round"},qrcode:{viewBox:"0 0 24 24",path:"M3 3h6v6H3V3zM15 3h6v6h-6V3zM3 15h6v6H3v-6zM15 15h2v2h-2v-2zM19 15h2v2h-2v-2zM15 19h2v2h-2v-2zM19 19h2v2h-2v-2zM5 5h2v2H5V5zM17 5h2v2h-2V5zM5 17h2v2H5v-2zM12 3h1v4h-1V3zM12 9h1v3h-1V9zM3 12h4v1H3v-1zM9 12h3v1H9v-1zM12 14h1v3h-1v-3zM12 19h1v2h-1v-2z",fill:"currentColor"},percent:{viewBox:"0 0 24 24",path:"M9 9a1.5 1.5 0 100-3 1.5 1.5 0 000 3zM15 18a1.5 1.5 0 100-3 1.5 1.5 0 000 3zM19 5L5 19",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},package:{viewBox:"0 0 24 24",path:"M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4M9 4l3 1.5L15 4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},truck:{viewBox:"0 0 24 24",path:"M13 16V6a1 1 0 00-1-1H4a1 1 0 00-1 1v10a1 1 0 001 1h1m8-1a1 1 0 01-1 1H9m4-1V8a1 1 0 011-1h2.586a1 1 0 01.707.293l3.414 3.414a1 1 0 01.293.707V16a1 1 0 01-1 1h-1m-6-1a1 1 0 001 1h1M5 17a2 2 0 104 0m-4 0a2 2 0 114 0m6 0a2 2 0 104 0m-4 0a2 2 0 114 0",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},box:{viewBox:"0 0 24 24",path:"M12 3L2 8.5V15.5L12 21L22 15.5V8.5L12 3ZM12 12V21M12 12L2 7M12 12L22 7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},shipping:{viewBox:"0 0 24 24",path:"M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2M4 7V4h16v3M4 7h16M8 4v3M16 4v3M12 11v4m-2-2h4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},calculator:{viewBox:"0 0 24 24",path:"M4 4a2 2 0 012-2h12a2 2 0 012 2v16a2 2 0 01-2 2H6a2 2 0 01-2-2V4zM8 6h8v4H8V6zM8 14h.01M12 14h.01M16 14h.01M8 18h.01M12 18h.01M16 18h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},briefcase:{viewBox:"0 0 24 24",path:"M20 7H4a2 2 0 00-2 2v10a2 2 0 002 2h16a2 2 0 002-2V9a2 2 0 00-2-2zM16 21V5a2 2 0 00-2-2h-4a2 2 0 00-2 2v16",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},gem:{viewBox:"0 0 24 24",path:"M6 3h12l4 6-10 12L2 9l4-6z M11 3L8 9l4 12 4-12-3-6 M2 9h20",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"shopping-cart":{viewBox:"0 0 24 24",path:"M9 22a1 1 0 100-2 1 1 0 000 2z M20 22a1 1 0 100-2 1 1 0 000 2z M1 1h4l2.68 13.39a2 2 0 002 1.61h9.72a2 2 0 002-1.61L23 6H6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}},ys={check:{viewBox:"0 0 24 24",path:"M5 13l4 4L19 7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"check-circle":{viewBox:"0 0 24 24",path:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"check-circle-filled":{viewBox:"0 0 24 24",path:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z",fill:"currentColor"},"check-square":{viewBox:"0 0 24 24",path:"M9 11l3 3L22 4M21 12v7a2 2 0 01-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2h11",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},x:{viewBox:"0 0 24 24",path:"M6 18L18 6M6 6l12 12",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"x-circle":{viewBox:"0 0 24 24",path:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"x-circle-filled":{viewBox:"0 0 24 24",path:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z",fill:"currentColor"},warning:{viewBox:"0 0 24 24",path:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"warning-filled":{viewBox:"0 0 24 24",path:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z",fill:"currentColor"},"alert-warning":{viewBox:"0 0 24 24",path:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},info:{viewBox:"0 0 24 24",path:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"info-filled":{viewBox:"0 0 24 24",path:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z",fill:"currentColor"},question:{viewBox:"0 0 24 24",path:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},exclamation:{viewBox:"0 0 24 24",path:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"alert-circle":{viewBox:"0 0 24 24",path:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},ban:{viewBox:"0 0 24 24",path:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},shield:{viewBox:"0 0 24 24",path:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"shield-check":{viewBox:"0 0 24 24",path:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"shield-x":{viewBox:"0 0 24 24",path:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m5.618-6.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},spinner:{viewBox:"0 0 24 24",path:"M12 2v4m0 12v4m10-10h-4M6 12H2m15.364-5.364l-2.828 2.828M9.464 14.536l-2.828 2.828m11.728 0l-2.828-2.828M9.464 9.464L6.636 6.636",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},loading:{viewBox:"0 0 24 24",path:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z",fill:"currentColor"},loader:{viewBox:"0 0 24 24",path:"M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},circle:{viewBox:"0 0 24 24",path:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"circle-filled":{viewBox:"0 0 24 24",path:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z",fill:"currentColor"},dot:{viewBox:"0 0 24 24",path:"M12 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",fill:"currentColor"},badge:{viewBox:"0 0 24 24",path:"M9 12l2 2 4-4M7.835 4.697a3.42 3.42 0 001.946-.806 3.42 3.42 0 014.438 0 3.42 3.42 0 001.946.806 3.42 3.42 0 013.138 3.138 3.42 3.42 0 00.806 1.946 3.42 3.42 0 010 4.438 3.42 3.42 0 00-.806 1.946 3.42 3.42 0 01-3.138 3.138 3.42 3.42 0 00-1.946.806 3.42 3.42 0 01-4.438 0 3.42 3.42 0 00-1.946-.806 3.42 3.42 0 01-3.138-3.138 3.42 3.42 0 00-.806-1.946 3.42 3.42 0 010-4.438 3.42 3.42 0 00.806-1.946 3.42 3.42 0 013.138-3.138z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},zap:{viewBox:"0 0 24 24",path:"M13 10V3L4 14h7v7l9-11h-7z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},activity:{viewBox:"0 0 24 24",path:"M22 12h-4l-3 9L9 3l-3 9H2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},pulse:{viewBox:"0 0 24 24",path:"M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"trending-up":{viewBox:"0 0 24 24",path:"M23 6l-9.5 9.5-5-5L1 18M17 6h6v6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"trending-down":{viewBox:"0 0 24 24",path:"M23 18l-9.5-9.5-5 5L1 6M17 18h6v-6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},key:{viewBox:"0 0 24 24",path:"M21 2l-2 2m-7.61 7.61a5.5 5.5 0 11-7.778 7.778 5.5 5.5 0 017.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"shield-alert":{viewBox:"0 0 24 24",path:"M12 9v2m0 4h.01M20.618 5.984A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"alert-triangle":{viewBox:"0 0 24 24",path:"M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z M12 9v4 M12 17h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}},bs={"chevron-up":{viewBox:"0 0 24 24",path:"M5 15l7-7 7 7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"chevron-down":{viewBox:"0 0 24 24",path:"M19 9l-7 7-7-7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"chevron-left":{viewBox:"0 0 24 24",path:"M15 19l-7-7 7-7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"chevron-right":{viewBox:"0 0 24 24",path:"M9 5l7 7-7 7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"chevrons-up":{viewBox:"0 0 24 24",path:"M17 11l-5-5-5 5M17 18l-5-5-5 5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"chevrons-down":{viewBox:"0 0 24 24",path:"M7 13l5 5 5-5M7 6l5 5 5-5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"chevrons-left":{viewBox:"0 0 24 24",path:"M11 17l-5-5 5-5M18 17l-5-5 5-5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"chevrons-right":{viewBox:"0 0 24 24",path:"M13 7l5 5-5 5M6 7l5 5-5 5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"external-link":{viewBox:"0 0 24 24",path:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},link:{viewBox:"0 0 24 24",path:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},unlink:{viewBox:"0 0 24 24",path:"M18.84 12.25l1.72-1.71h-.02a5.004 5.004 0 00-.12-7.07 5.006 5.006 0 00-6.95 0l-1.72 1.71M5.17 11.75l-1.71 1.71a5.004 5.004 0 00.12 7.07 5.006 5.006 0 006.95 0l1.71-1.71M8 2v3M2 8h3M16 22v-3M22 16h-3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"corner-up-left":{viewBox:"0 0 24 24",path:"M9 14L4 9l5-5M20 20v-7a4 4 0 00-4-4H4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"corner-up-right":{viewBox:"0 0 24 24",path:"M15 14l5-5-5-5M4 20v-7a4 4 0 014-4h12",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"corner-down-left":{viewBox:"0 0 24 24",path:"M9 10L4 15l5 5M20 4v7a4 4 0 01-4 4H4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"corner-down-right":{viewBox:"0 0 24 24",path:"M15 10l5 5-5 5M4 4v7a4 4 0 004 4h12",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"rotate-cw":{viewBox:"0 0 24 24",path:"M23 4v6h-6M1 20v-6h6M3.51 9a9 9 0 0114.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0020.49 15",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"rotate-ccw":{viewBox:"0 0 24 24",path:"M1 4v6h6M23 20v-6h-6M20.49 9A9 9 0 005.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 013.51 15",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},undo:{viewBox:"0 0 24 24",path:"M3 7v6h6M3 13l4.64-4.36A9 9 0 0121 12",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},redo:{viewBox:"0 0 24 24",path:"M21 7v6h-6M21 13l-4.64-4.36A9 9 0 003 12",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},move:{viewBox:"0 0 24 24",path:"M5 9l-3 3 3 3M9 5l3-3 3 3M15 19l-3 3-3-3M19 9l3 3-3 3M2 12h20M12 2v20",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},expand:{viewBox:"0 0 24 24",path:"M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},shrink:{viewBox:"0 0 24 24",path:"M4 14h6v6M20 10h-6V4M14 10l7-7M3 21l7-7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"log-in":{viewBox:"0 0 24 24",path:"M15 3h4a2 2 0 012 2v14a2 2 0 01-2 2h-4M10 17l5-5-5-5M15 12H3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"log-out":{viewBox:"0 0 24 24",path:"M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4M16 17l5-5-5-5M21 12H9",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"sidebar-left":{viewBox:"0 0 24 24",path:"M4 4h16a2 2 0 012 2v12a2 2 0 01-2 2H4a2 2 0 01-2-2V6a2 2 0 012-2zM9 4v16",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"sidebar-right":{viewBox:"0 0 24 24",path:"M4 4h16a2 2 0 012 2v12a2 2 0 01-2 2H4a2 2 0 01-2-2V6a2 2 0 012-2zM15 4v16",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"panel-left":{viewBox:"0 0 24 24",path:"M3 3h18v18H3V3zM9 3v18",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"panel-right":{viewBox:"0 0 24 24",path:"M3 3h18v18H3V3zM15 3v18",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"panel-top":{viewBox:"0 0 24 24",path:"M3 3h18v18H3V3zM3 9h18",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"panel-bottom":{viewBox:"0 0 24 24",path:"M3 3h18v18H3V3zM3 15h18",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},layers:{viewBox:"0 0 24 24",path:"M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},layout:{viewBox:"0 0 24 24",path:"M4 4h16a2 2 0 012 2v12a2 2 0 01-2 2H4a2 2 0 01-2-2V6a2 2 0 012-2zM2 9h20M9 20V9",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},hash:{viewBox:"0 0 24 24",path:"M4 9h16M4 15h16M10 3L8 21M16 3l-2 18",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"more-horizontal":{viewBox:"0 0 24 24",path:"M12 12h.01M8 12h.01M16 12h.01",stroke:"currentColor",fill:"none",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"},"more-vertical":{viewBox:"0 0 24 24",path:"M12 12h.01M12 8h.01M12 16h.01",stroke:"currentColor",fill:"none",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}},ks={tree:{viewBox:"0 0 24 24",path:"M12 2l2 4h-1l2 4h-1.5l2.5 5h-2l3 6H7l3-6H8l2.5-5H9l2-4h-1l2-4zm-1 19h2v3h-2v-3z",stroke:"currentColor",fill:"none",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"},"star-decoration":{viewBox:"0 0 24 24",path:"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z",stroke:"currentColor",fill:"none",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"},snowflake:{viewBox:"0 0 24 24",paths:["M12 2v20M2 12h20","M4.93 4.93l14.14 14.14M19.07 4.93L4.93 19.07","M12 6l-2 2 2 2 2-2-2-2zM12 14l-2 2 2 2 2-2-2-2z","M6 12l2-2-2-2-2 2 2 2zM14 12l2 2 2-2-2-2-2 2z"],stroke:"currentColor",fill:"none",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"},gift:{viewBox:"0 0 24 24",paths:["M20 12v10H4V12","M22 7H2v5h20V7z","M12 22V7","M12 7H7.5a2.5 2.5 0 0 1 0-5C11 2 12 7 12 7z","M12 7h4.5a2.5 2.5 0 0 0 0-5C13 2 12 7 12 7z"],stroke:"currentColor",fill:"none",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"},"candy-cane":{viewBox:"0 0 24 24",path:"M14.5 3a4.5 4.5 0 0 0-4.5 4.5v13a.5.5 0 0 0 1 0V7.5a3.5 3.5 0 1 1 7 0v1a2.5 2.5 0 0 1-5 0v-.5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},bauble:{viewBox:"0 0 24 24",paths:["M12 22a8 8 0 1 0 0-16 8 8 0 0 0 0 16z","M12 6V3","M9 3h6","M12 6a1 1 0 0 0 1-1V4a1 1 0 0 0-2 0v1a1 1 0 0 0 1 1z"],stroke:"currentColor",fill:"none",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"},bells:{viewBox:"0 0 24 24",paths:["M9 18a5 5 0 0 1-5-5c0-2.76 2.24-5 5-5s5 2.24 5 5a5 5 0 0 1-5 5z","M15 18a5 5 0 0 1-5-5c0-2.76 2.24-5 5-5s5 2.24 5 5a5 5 0 0 1-5 5z","M7 8L5 4M17 8l2-4M9 8V5M15 8V5","M11 5h2"],stroke:"currentColor",fill:"none",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"},holly:{viewBox:"0 0 24 24",paths:["M8 4c-2 2-3 5-1 8 1 2 3 3 5 3s4-1 5-3c2-3 1-6-1-8","M16 4c2 2 3 5 1 8-1 2-3 3-5 3s-4-1-5-3c-2-3-1-6 1-8","M10 17a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3z","M14 17a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3z","M12 19a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3z"],stroke:"currentColor",fill:"none",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"},snowman:{viewBox:"0 0 24 24",paths:["M12 22a5 5 0 1 0 0-10 5 5 0 0 0 0 10z","M12 12a3 3 0 1 0 0-6 3 3 0 0 0 0 6z","M9 9h.01M15 9h.01","M10 10.5s.5 1 2 1 2-1 2-1","M7 2l3 3M17 2l-3 3M12 2v3","M5 15h2M17 15h2"],stroke:"currentColor",fill:"none",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"},reindeer:{viewBox:"0 0 24 24",paths:["M12 22c-3 0-5-2-5-5 0-2 1-4 3-5l2-1 2 1c2 1 3 3 3 5 0 3-2 5-5 5z","M7 12c-2-1-3-3-3-5 0-1 .5-2 1-2s1 .5 1.5 1c.5.5 1 1.5 1.5 2","M17 12c2-1 3-3 3-5 0-1-.5-2-1-2s-1 .5-1.5 1c-.5.5-1 1.5-1.5 2","M4 5l1 2M3 7l2 1M20 5l-1 2M21 7l-2 1","M10 17h.01M14 17h.01","M12 19a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"],stroke:"currentColor",fill:"none",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"},sleigh:{viewBox:"0 0 24 24",paths:["M4 15h14c1 0 2 1 2 2v1H4v-3z","M6 15V8c0-1 1-2 2-2h8c1 0 2 1 2 2v7","M2 20c0-1 2-2 4-2h12c2 0 4 1 4 2","M3 18h1M20 18h1"],stroke:"currentColor",fill:"none",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"},wreath:{viewBox:"0 0 24 24",paths:["M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z","M12 18a6 6 0 1 0 0-12 6 6 0 0 0 0 12z","M12 2v2M12 20v2M2 12h2M20 12h2","M10 3l1 2M13 3l-1 2","M10 3h4"],stroke:"currentColor",fill:"none",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"},"party-popper":{viewBox:"0 0 24 24",paths:["M5.8 11.3 2 22l10.7-3.79","M4 3h.01","M22 8h.01","M15 2h.01","M22 20h.01","M22 2 19.79 7.3 16 8l3.79.79L22 14","M9.6 14.4 14 10","M22 13c-1.93 1.93-5.07 1.93-7 0","M11 8c1.93-1.93 1.93-5.07 0-7","M2 13c1.93 1.93 5.07 1.93 7 0"],stroke:"currentColor",fill:"none",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}},_s={sun:{viewBox:"0 0 24 24",path:"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41M12 6a6 6 0 1 0 0 12 6 6 0 0 0 0-12z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},sunrise:{viewBox:"0 0 24 24",path:"M17 18a5 5 0 1 0-10 0M12 2v7M4.22 10.22l1.42 1.42M1 18h2M21 18h2M18.36 11.64l1.42-1.42M23 22H1M8 6l4-4 4 4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},sunset:{viewBox:"0 0 24 24",path:"M17 18a5 5 0 1 0-10 0M12 9v7M4.22 10.22l1.42 1.42M1 18h2M21 18h2M18.36 11.64l1.42-1.42M23 22H1M16 5l-4 4-4-4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},cloud:{viewBox:"0 0 24 24",path:"M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"cloud-sun":{viewBox:"0 0 24 24",path:"M12 2v2M4.93 4.93l1.41 1.41M2 12h2M19 12a4 4 0 0 0-4-4h-.35A5.5 5.5 0 0 0 4 11a5 5 0 0 0 0 10h11a4 4 0 0 0 4-5v-4z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"cloud-off":{viewBox:"0 0 24 24",path:"M22.61 16.95A5 5 0 0 0 18 10h-1.26a8 8 0 0 0-7.05-6M5 5a8 8 0 0 0 4 15h9a5 5 0 0 0 1.7-.3M1 1l22 22",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},rain:{viewBox:"0 0 24 24",path:"M16 13v8M8 13v8M12 15v8M20 16.58A5 5 0 0 0 18 7h-1.26A8 8 0 1 0 4 15.25",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"cloud-rain":{viewBox:"0 0 24 24",path:"M16 13v8M8 13v8M12 15v8M20 16.58A5 5 0 0 0 18 7h-1.26A8 8 0 1 0 4 15.25",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"cloud-drizzle":{viewBox:"0 0 24 24",path:"M8 19v2M8 13v2M16 19v2M16 13v2M12 21v2M12 15v2M20 16.58A5 5 0 0 0 18 7h-1.26A8 8 0 1 0 4 15.25",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},snow:{viewBox:"0 0 24 24",path:"M20 17.58A5 5 0 0 0 18 8h-1.26A8 8 0 1 0 4 16.25M8 16h.01M8 20h.01M12 18h.01M12 22h.01M16 16h.01M16 20h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},snowflake:{viewBox:"0 0 24 24",path:"M12 2v20M17.66 7l-11.32 10M20.54 12H3.46M17.66 17L6.34 7M12 2l3 3M12 2l-3 3M12 22l3-3M12 22l-3-3M2 12l3 3M2 12l3-3M22 12l-3 3M22 12l-3-3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},wind:{viewBox:"0 0 24 24",path:"M9.59 4.59A2 2 0 1 1 11 8H2m10.59 11.41A2 2 0 1 0 14 16H2m15.73-8.27A2.5 2.5 0 1 1 19.5 12H2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"cloud-lightning":{viewBox:"0 0 24 24",path:"M19 16.9A5 5 0 0 0 18 7h-1.26a8 8 0 1 0-11.62 9M13 11l-4 6h6l-4 6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},lightning:{viewBox:"0 0 24 24",path:"M13 2L3 14h9l-1 8 10-12h-9l1-8z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},fog:{viewBox:"0 0 24 24",path:"M20 15h2M2 15h8M6 19h14M4 11h16M8 7h12",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},haze:{viewBox:"0 0 24 24",path:"M12 3v1M12 20v1M3 12h1M20 12h1M5.6 5.6l.7.7M17.7 17.7l.7.7M5.6 18.4l.7-.7M17.7 6.3l.7-.7M8 12a4 4 0 1 0 8 0 4 4 0 0 0-8 0",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},thermometer:{viewBox:"0 0 24 24",path:"M14 14.76V3.5a2.5 2.5 0 0 0-5 0v11.26a4.5 4.5 0 1 0 5 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"thermometer-sun":{viewBox:"0 0 24 24",path:"M12 9a4 4 0 0 0-2 7.5M12 3v2M5.6 5.6l1.4 1.4M3 12h2M5.6 18.4l1.4-1.4M12 14a2 2 0 1 0 0 4 2 2 0 0 0 0-4zM12 10V3M16 14.76V8a2 2 0 0 0-4 0v6.76",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},moon:{viewBox:"0 0 24 24",path:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"moon-star":{viewBox:"0 0 24 24",path:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9zM19 3v4M17 5h4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},umbrella:{viewBox:"0 0 24 24",path:"M23 12a11.05 11.05 0 0 0-22 0zm-5 7a3 3 0 0 1-6 0v-7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},droplet:{viewBox:"0 0 24 24",path:"M12 2.69l5.66 5.66a8 8 0 1 1-11.31 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},droplets:{viewBox:"0 0 24 24",path:"M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05zM12.56 14.94c1.47 0 2.67-1.25 2.67-2.77 0-.8-.38-1.55-1.14-2.18-.76-.64-1.17-1.32-1.38-2.29-.21.97-.62 1.65-1.38 2.29-.76.63-1.14 1.38-1.14 2.18 0 1.52 1.19 2.77 2.67 2.77zM19.5 17.35c1.1 0 2-.93 2-2.08 0-.6-.29-1.17-.86-1.64-.57-.48-.88-1-.57-1.73-.31.73-.62 1.25-1.19 1.73-.57.47-.86 1.04-.86 1.64 0 1.15.9 2.08 2 2.08z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},rainbow:{viewBox:"0 0 24 24",path:"M22 17a10 10 0 0 0-20 0M18 17a6 6 0 0 0-12 0M14 17a2 2 0 0 0-4 0",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}},ws={smartphone:{viewBox:"0 0 24 24",path:"M17 2H7a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2zM12 18h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"phone-call":{viewBox:"0 0 24 24",path:"M15.05 5A5 5 0 0 1 19 8.95M15.05 1A9 9 0 0 1 23 8.94m-1 7.98v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"phone-off":{viewBox:"0 0 24 24",path:"M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91M23 1L1 23",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},tablet:{viewBox:"0 0 24 24",path:"M18 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2zM12 18h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"tablet-smartphone":{viewBox:"0 0 24 24",path:"M18 2H10a2 2 0 0 0-2 2v4M14 22h4a2 2 0 0 0 2-2V8M8 14H6a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2zM7 18h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},laptop:{viewBox:"0 0 24 24",path:"M20 16V7a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v9m16 0H4m16 0l1.28 2.55a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45L4 16",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},monitor:{viewBox:"0 0 24 24",path:"M20 3H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zM8 21h8M12 17v4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},desktop:{viewBox:"0 0 24 24",path:"M20 3H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zM8 21h8M12 17v4M2 12h20",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},tv:{viewBox:"0 0 24 24",path:"M20 7H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2zM17 2l-5 5-5-5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"tv-minimal":{viewBox:"0 0 24 24",path:"M20 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},watch:{viewBox:"0 0 24 24",path:"M12 19a7 7 0 1 0 0-14 7 7 0 0 0 0 14zM12 9v3l1.5 1.5M16.51 17.35l-.35 3.83a2 2 0 0 1-2 1.82H9.83a2 2 0 0 1-2-1.82l-.35-3.83m.01-10.7l.35-3.83A2 2 0 0 1 9.83 1h4.35a2 2 0 0 1 2 1.82l.35 3.83",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},smartwatch:{viewBox:"0 0 24 24",path:"M18 8a6 6 0 0 0-12 0v8a6 6 0 0 0 12 0V8zM12 11v3M18 6l1-3H5l1 3M18 18l1 3H5l1-3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},speaker:{viewBox:"0 0 24 24",path:"M18 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2zM12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4zM12 6h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},headphones:{viewBox:"0 0 24 24",path:"M3 18v-6a9 9 0 0 1 18 0v6M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3zM3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},airpods:{viewBox:"0 0 24 24",path:"M5.5 4a2.5 2.5 0 0 0-2.5 2.5v5a2.5 2.5 0 0 0 5 0v-5A2.5 2.5 0 0 0 5.5 4zM18.5 4a2.5 2.5 0 0 0-2.5 2.5v5a2.5 2.5 0 0 0 5 0v-5A2.5 2.5 0 0 0 18.5 4zM5.5 14v6M18.5 14v6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},camera:{viewBox:"0 0 24 24",path:"M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2zM12 17a4 4 0 1 0 0-8 4 4 0 0 0 0 8z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},webcam:{viewBox:"0 0 24 24",path:"M12 14a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM12 14v8M8 22h8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},keyboard:{viewBox:"0 0 24 24",path:"M20 5H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2zM6 9h.01M10 9h.01M14 9h.01M18 9h.01M6 13h.01M18 13h.01M8 17h8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},mouse:{viewBox:"0 0 24 24",path:"M6 3h12a3 3 0 0 1 3 3v12a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3zM12 3v6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},gamepad:{viewBox:"0 0 24 24",path:"M6 12h4M8 10v4M15 13h.01M18 11h.01M17.32 5H6.68a4 4 0 0 0-3.978 3.59l-.891 9a4 4 0 0 0 6.9 3.31l1.29-1.29 1.29 1.29a4 4 0 0 0 6.9-3.31l-.891-9A4 4 0 0 0 17.32 5z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},joystick:{viewBox:"0 0 24 24",path:"M21 17a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-2zM6 15v-2M12 15V5m0 0l4 4m-4-4L8 9",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},database:{viewBox:"0 0 24 24",path:"M12 2C6.477 2 2 3.582 2 5.5v3C2 10.418 6.477 12 12 12s10-1.582 10-3.5v-3C22 3.582 17.523 2 12 2zM2 8.5v4C2 14.418 6.477 16 12 16s10-1.582 10-3.5v-4M2 12.5v4C2 18.418 6.477 20 12 20s10-1.582 10-3.5v-4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"hard-drive":{viewBox:"0 0 24 24",path:"M22 12H2M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11zM6 16h.01M10 16h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},usb:{viewBox:"0 0 24 24",path:"M16 4h2a2 2 0 0 1 2 2v1M6 4h2a2 2 0 0 1 2 2v1M10 16v-5a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v5a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2zM20 16v-5a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v5a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2zM12 12v8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},router:{viewBox:"0 0 24 24",path:"M20 14H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2zM6 18h.01M12 7a5 5 0 0 0-5 5M19 7a5 5 0 0 0-5-5M12 7V2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},printer:{viewBox:"0 0 24 24",path:"M6 9V2h12v7M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2M6 14h12v8H6z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},cpu:{viewBox:"0 0 24 24",path:"M18 4H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zM9 9h6v6H9zM9 1v3M15 1v3M9 20v3M15 20v3M20 9h3M20 14h3M1 9h3M1 14h3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},battery:{viewBox:"0 0 24 24",path:"M17 6H5a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2zM23 13v-2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"battery-charging":{viewBox:"0 0 24 24",path:"M5 18H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h3.19M15 6h2a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-3.19M23 13v-2M11 6l-4 6h6l-4 6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},plug:{viewBox:"0 0 24 24",path:"M12 22v-5M9 8V2M15 8V2M18 8H6a2 2 0 0 0-2 2v1a8 8 0 0 0 16 0v-1a2 2 0 0 0-2-2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}},Ms={"chart-line":{viewBox:"0 0 24 24",path:"M3 3v18h18M18 9l-5 5-4-4-3 3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"chart-bar":{viewBox:"0 0 24 24",path:"M12 20V10M6 20v-4M18 20V4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"bar-chart":{viewBox:"0 0 24 24",path:"M12 20V10M6 20v-4M18 20V4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"chart-bar-horizontal":{viewBox:"0 0 24 24",path:"M4 12h10M4 6h4M4 18h14",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"chart-pie":{viewBox:"0 0 24 24",path:"M21.21 15.89A10 10 0 1 1 8 2.83M22 12A10 10 0 0 0 12 2v10z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"chart-area":{viewBox:"0 0 24 24",path:"M3 3v18h18M7 12l5-5 4 4 5-5v12H7z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"chart-candlestick":{viewBox:"0 0 24 24",path:"M9 5v4M9 11v8M15 5v8M15 17v2M7 9h4v2H7zM13 13h4v4h-4z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"trending-up":{viewBox:"0 0 24 24",path:"M23 6l-9.5 9.5-5-5L1 18",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"trending-down":{viewBox:"0 0 24 24",path:"M23 18l-9.5-9.5-5 5L1 6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"trending-neutral":{viewBox:"0 0 24 24",path:"M22 12H2M18 8l4 4-4 4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},wallet:{viewBox:"0 0 24 24",path:"M21 12V7a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-1M21 12H17a2 2 0 0 1 0-4h4M17 12h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"credit-card":{viewBox:"0 0 24 24",path:"M21 4H3a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zM1 10h22",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},banknote:{viewBox:"0 0 24 24",path:"M2 8a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8zM12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4zM6 10h.01M18 14h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},coins:{viewBox:"0 0 24 24",path:"M8 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM8 12c2.2 0 4 1.8 4 4s-1.8 4-4 4-4-1.8-4-4 1.8-4 4-4zM16 8a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM16 8c2.2 0 4 1.8 4 4s-1.8 4-4 4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"dollar-sign":{viewBox:"0 0 24 24",path:"M12 1v22M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"pound-sign":{viewBox:"0 0 24 24",path:"M18 5H9a4 4 0 0 0-4 4v3a4 4 0 0 0 4 4h3M5 12h10M18 19H7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"euro-sign":{viewBox:"0 0 24 24",path:"M4 10h12M4 14h12M17 5a8 8 0 0 0-14 5.5 8 8 0 0 0 14 5.5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},bitcoin:{viewBox:"0 0 24 24",path:"M11.767 19.089c4.924.868 6.14-6.025 1.216-6.894m-1.216 6.894L5.86 18.047m5.908 1.042-.347 1.97m1.563-8.864c4.924.869 6.14-6.025 1.215-6.893m-1.215 6.893-3.94-.694m5.155-6.2L8.29 4.26m5.908 1.042.348-1.97M7.48 20.364l3.126-17.727",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},bank:{viewBox:"0 0 24 24",path:"M3 21h18M4 21V10M8 21V10M12 21V10M16 21V10M20 21V10M12 3L2 8h20z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},vault:{viewBox:"0 0 24 24",path:"M3 5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5zM12 12m-3 0a3 3 0 1 0 6 0 3 3 0 1 0-6 0M7 12h2M15 12h2M12 9V7M12 17v-2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"piggy-bank":{viewBox:"0 0 24 24",path:"M19 5c-1.5 0-2.8 1.4-3 2-3.5-1.5-11-.3-11 5 0 1.8 0 3 2 4.5V20h4v-2h3v2h4v-4c1-.5 1.7-1 2-2h2v-4h-2c0-1-.5-1.5-1-2zM2 9v1c0 1.1.9 2 2 2h1",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},safe:{viewBox:"0 0 24 24",path:"M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2zM12 12m-2 0a2 2 0 1 0 4 0 2 2 0 1 0-4 0M16 8h.01M16 16h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},receipt:{viewBox:"0 0 24 24",path:"M4 2v20l3-2 3 2 3-2 3 2 3-2 3 2V2l-3 2-3-2-3 2-3-2-3 2-3-2zM8 10h8M8 14h4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},invoice:{viewBox:"0 0 24 24",path:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8zM14 2v6h6M8 13h8M8 17h8M8 9h2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},briefcase:{viewBox:"0 0 24 24",path:"M20 7H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2zM16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},percent:{viewBox:"0 0 24 24",path:"M19 5L5 19M6.5 9a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5zM17.5 20a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},calculator:{viewBox:"0 0 24 24",path:"M18 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2zM8 6h8M8 10h.01M12 10h.01M16 10h.01M8 14h.01M12 14h.01M16 14h.01M8 18h.01M12 18h.01M16 18h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},growth:{viewBox:"0 0 24 24",path:"M12 20V12M12 12l-4 4M12 12l4 4M8 20h8M3 8l4-4 4 4 5-5 5 5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},investment:{viewBox:"0 0 24 24",path:"M12 2v20M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6M2 12h4M18 12h4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},scale:{viewBox:"0 0 24 24",path:"M12 3v18M3 6l3 10a6 6 0 0 0 6 0L15 6M9 6l6 0M21 6l-3 10a6 6 0 0 1-6 0",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}},xs={"heart-pulse":{viewBox:"0 0 24 24",path:"M19.5 12.572l-7.5 7.428-7.5-7.428A5 5 0 1 1 12 5.006a5 5 0 1 1 7.5 7.566zM3 12h4l2-4 4 8 2-4h6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},activity:{viewBox:"0 0 24 24",path:"M22 12h-4l-3 9L9 3l-3 9H2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},pulse:{viewBox:"0 0 24 24",path:"M3 12h4l2-7 4 14 2-7h6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},pill:{viewBox:"0 0 24 24",path:"M10.5 20.5l9-9a4.95 4.95 0 0 0-7-7l-9 9a4.95 4.95 0 0 0 7 7zM8.5 8.5l7 7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"pill-bottle":{viewBox:"0 0 24 24",path:"M6 3h12v5H6zM5 8h14a1 1 0 0 1 1 1v11a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V9a1 1 0 0 1 1-1zM10 14h4M12 12v4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},capsule:{viewBox:"0 0 24 24",path:"M8 8a4 4 0 0 1 8 0v8a4 4 0 0 1-8 0V8zM8 12h8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},syringe:{viewBox:"0 0 24 24",path:"M18 2l4 4M15 5l6 6M8 6l10 10-4 4L4 10zM2 22l6-6M7 11l2 2M11 7l2 2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},vaccine:{viewBox:"0 0 24 24",path:"M14 2l4 4M8 8l8 8M3 17l4 4M6.5 6.5L20 20M12 12l2.5-2.5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},stethoscope:{viewBox:"0 0 24 24",path:"M4.8 2.3A.3.3 0 1 0 5 2H4a2 2 0 0 0-2 2v5a6 6 0 0 0 6 6v0a6 6 0 0 0 6-6V4a2 2 0 0 0-2-2h-1a.2.2 0 1 0 .3.3M8 15v1a6 6 0 0 0 6 6v0a6 6 0 0 0 6-6v-4M22 10a2 2 0 1 0-4 0 2 2 0 0 0 4 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"thermometer-medical":{viewBox:"0 0 24 24",path:"M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0zM12 14v2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},bandage:{viewBox:"0 0 24 24",path:"M18 2l4 4-14 14-4-4zM10.5 7.5l6 6M8.5 9.5l1 1M14.5 15.5l1 1M12.5 11.5l1 1",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},hospital:{viewBox:"0 0 24 24",path:"M3 21h18M5 21V7l7-4 7 4v14M9 21v-6h6v6M10 9h4M12 7v4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},ambulance:{viewBox:"0 0 24 24",path:"M10 10H6M8 8v4M15 21a2 2 0 1 0 0-4 2 2 0 0 0 0 4zM7 21a2 2 0 1 0 0-4 2 2 0 0 0 0 4zM21 15V8a2 2 0 0 0-2-2h-3l-2-3H6a2 2 0 0 0-2 2v10M21 9h-4a2 2 0 0 0-2 2v4h6z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"first-aid":{viewBox:"0 0 24 24",path:"M20 6H4a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2zM9 12h6M12 9v6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"medical-cross":{viewBox:"0 0 24 24",path:"M8 3h8v6h5v6h-5v6H8v-6H3V9h5z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},dna:{viewBox:"0 0 24 24",path:"M2 15c6.667-6 13.333 0 20-6M9 22c1.798-1.998 2.518-3.995 2.807-5.993M15 2c-1.798 1.998-2.518 3.995-2.807 5.993M2 9c6.667 6 13.333 0 20 6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},microscope:{viewBox:"0 0 24 24",path:"M6 18h8M3 22h18M14 22a7 7 0 1 0 0-14M9 14h.01M9 6v8M6 6h6l-3-4z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"test-tube":{viewBox:"0 0 24 24",path:"M14.5 2v17.5c0 1.4-1.1 2.5-2.5 2.5s-2.5-1.1-2.5-2.5V2M7 2h10M8.5 14h7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},brain:{viewBox:"0 0 24 24",path:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18ZM12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18ZM12 5v13",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},lungs:{viewBox:"0 0 24 24",path:"M6.081 20C2.477 20 2 15.5 2 12.5S4 6 4 6s2-1 2-3M17.92 20c3.603 0 4.08-4.5 4.08-7.5S20 6 20 6s-2-1-2-3M12 3v17M12 12c-4 0-7-2-7-2M12 12c4 0 7-2 7-2M12 16c-4 0-7-2-7-2M12 16c4 0 7-2 7-2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},bone:{viewBox:"0 0 24 24",path:"M17 10c.7-.7 1.69 0 2.5 0a2.5 2.5 0 1 0 0-5 .5.5 0 0 1-.5-.5 2.5 2.5 0 1 0-5 0c0 .81.7 1.8 0 2.5l-7 7c-.7.7-1.69 0-2.5 0a2.5 2.5 0 0 0 0 5c.28 0 .5.22.5.5a2.5 2.5 0 1 0 5 0c0-.81-.7-1.8 0-2.5Z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},tooth:{viewBox:"0 0 24 24",path:"M12 2C7 2 4 5 4 8c0 5 1 8 2 10 .5 1 1 4 2.5 4s1.5-2 3.5-2 2 2 3.5 2 2-3 2.5-4c1-2 2-5 2-10 0-3-3-6-8-6z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"eye-medical":{viewBox:"0 0 24 24",path:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8zM12 9v6M9 12h6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},wheelchair:{viewBox:"0 0 24 24",path:"M12 10a2 2 0 1 0 0-4 2 2 0 0 0 0 4zM15 21a4 4 0 1 0-5-6M12 10v4h4l2 5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},crutch:{viewBox:"0 0 24 24",path:"M5 5l7 7M7 3l7 7M19 19l-7-7M21 17l-7-7M11 11l-6 6M13 13l-6 6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"scale-weight":{viewBox:"0 0 24 24",path:"M12 3a9 9 0 0 0-9 9 9 9 0 0 0 9 9 9 9 0 0 0 9-9 9 9 0 0 0-9-9zM12 7v5l3 3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"blood-drop":{viewBox:"0 0 24 24",path:"M12 2c-4 4-7 7-7 11a7 7 0 0 0 14 0c0-4-3-7-7-11z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},heartbeat:{viewBox:"0 0 24 24",path:"M3 12h4l3-9 4 18 3-9h4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}},Ls={football:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM12 6l4 4-4 4-4-4zM6 12l4-4v8zM18 12l-4 4V8z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},soccer:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM12 8l2.5 2-1 3h-3l-1-3zM12 2v3M22 12h-3M12 22v-3M2 12h3M4.93 4.93l2.12 2.12M19.07 4.93l-2.12 2.12M4.93 19.07l2.12-2.12M19.07 19.07l-2.12-2.12",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},basketball:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM2.05 11h19.9M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},tennis:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM3.5 8.5c4-1 8 0 12 4M3.5 15.5c4 1 8 0 12-4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},baseball:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM5 5c1.5 2 2.5 4 2.5 7s-1 5-2.5 7M19 5c-1.5 2-2.5 4-2.5 7s1 5 2.5 7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},volleyball:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM12 2v10M12 12l8.66 5M12 12l-8.66 5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},golf:{viewBox:"0 0 24 24",path:"M12 18v4M8 22h8M12 2v16M12 6l6-2-6 8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},bowling:{viewBox:"0 0 24 24",path:"M12 22a8 8 0 1 0 0-16 8 8 0 0 0 0 16zM12 6V2M10 9h.01M14 9h.01M12 12h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},rugby:{viewBox:"0 0 24 24",path:"M5 5c8-2 16 6 14 14C11 21 3 13 5 5zM9 9l6 6M11 9l-1 1M13 11l-1 1M15 13l-1 1",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},cricket:{viewBox:"0 0 24 24",path:"M14 2l8 8-9 9-3-3 9-9M13 3l-9 9M7 17a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},hockey:{viewBox:"0 0 24 24",path:"M7 2v11c0 3 2 5 5 5h3a3 3 0 0 0 0-6M19 18.5a2 2 0 1 0 0 4 2 2 0 0 0 0-4z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"table-tennis":{viewBox:"0 0 24 24",path:"M14.5 3.5a7 7 0 0 0-9.9 9.9l-2.3 4.3a1 1 0 0 0 1.3 1.3l4.3-2.3a7 7 0 0 0 6.6-13.2zM17 15.5a3 3 0 1 0 0 6 3 3 0 0 0 0-6z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"world-cup":{viewBox:"0 0 24 24",path:"M12 2a5 5 0 1 0 0 10 5 5 0 0 0 0-10zM7 7h10M12 2v10M9 3.2c-1.4 2-1.4 5.6 0 7.6M15 3.2c1.4 2 1.4 5.6 0 7.6M10 12l-1 4h6l-1-4M8 16h8M11 16v4M13 16v4M8 20h8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},jersey:{viewBox:"0 0 24 24",path:"M9 3L4 6l2.5 3.5L9 8M15 3l5 3-2.5 3.5L15 8M9 3a3 3 0 0 0 6 0M9 8v13h6V8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"football-boot":{viewBox:"0 0 24 24",path:"M3 7v5a3 3 0 0 0 3 3h11a4 4 0 0 0 1-7.9L9 7c-1-1-2.2-2-4-2H3zM5 18h2M9 18h2M13 18h2M17 18h2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},goal:{viewBox:"0 0 24 24",path:"M2 5h20v11H2zM2 5l3 3v8M22 5l-3 3v8M5 8h14v8M2 11h20M9 8v8M15 8v8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"corner-flag":{viewBox:"0 0 24 24",path:"M6 2v20M6 3h12l-3.5 4L18 11H6M3 22h6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"referee-card":{viewBox:"0 0 24 24",path:"M8.5 2.5l9 3a2 2 0 0 1 1.3 2.5l-4.6 13a2 2 0 0 1-2.5 1.3l-9-3a2 2 0 0 1-1.3-2.5l4.6-13a2 2 0 0 1 2.5-1.3z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},stadium:{viewBox:"0 0 24 24",path:"M2 8c0-2.2 4.5-4 10-4s10 1.8 10 4-4.5 4-10 4-10-1.8-10-4zM2 8v6c0 2.2 4.5 4 10 4s10-1.8 10-4V8M8 12.5V18M16 12.5V18",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},scoreboard:{viewBox:"0 0 24 24",path:"M3 4h18v12H3zM3 16l3 4M21 16l-3 4M12 6v8M6 8h3v6H6zM15 8h3v6h-3z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},dumbbell:{viewBox:"0 0 24 24",path:"M6.5 6.5h11M17.5 4v5M6.5 4v5M17.5 15v5M6.5 15v5M4 6v3a1 1 0 0 0 1 1h1.5M4 18v-3a1 1 0 0 1 1-1h1.5M20 6v3a1 1 0 0 1-1 1h-1.5M20 18v-3a1 1 0 0 0-1-1h-1.5M6.5 17.5h11",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},barbell:{viewBox:"0 0 24 24",path:"M4 12h16M6 8v8M10 6v12M14 6v12M18 8v8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},kettlebell:{viewBox:"0 0 24 24",path:"M12 6a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM17 22H7a5 5 0 0 1-1-9.9V10a6 6 0 0 1 12 0v2.1a5 5 0 0 1-1 9.9z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},running:{viewBox:"0 0 24 24",path:"M13 4a2 2 0 1 0 0-4 2 2 0 0 0 0 4zM5 22l3-9 3 3v6M10 6l5 3 4-1M4 13l5 3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},swimming:{viewBox:"0 0 24 24",path:"M2 20c.9 0 1.6-.4 2.2-.9.8-.7 1.9-.7 2.7 0 1.1 1 2.8 1 3.9 0 .8-.7 1.9-.7 2.7 0 1.1 1 2.8 1 3.9 0 .8-.7 1.9-.7 2.7 0 .6.5 1.3.9 2.2.9M8 16l-2-4 4-2 6 4 4-3M15 4a2 2 0 1 0 0-4 2 2 0 0 0 0 4z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},cycling:{viewBox:"0 0 24 24",path:"M5 18a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM19 18a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM5 14l4-4 3 3 4-4M12 6a2 2 0 1 0 0-4 2 2 0 0 0 0 4z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},yoga:{viewBox:"0 0 24 24",path:"M12 4a2 2 0 1 0 0-4 2 2 0 0 0 0 4zM4 17l4-4-2-4 6-3 6 3-2 4 4 4M8 22l4-5 4 5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},trophy:{viewBox:"0 0 24 24",path:"M6 9H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h2M18 9h2a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2h-2M6 3v6a6 6 0 0 0 12 0V3M12 15v4M8 22h8M8 19h8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},medal:{viewBox:"0 0 24 24",path:"M12 15a6 6 0 1 0 0 12 6 6 0 0 0 0-12zM8 3l4 6 4-6M8 3h8M12 9v6M9 19.5l3 1.5 3-1.5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},award:{viewBox:"0 0 24 24",path:"M12 15a7 7 0 1 0 0-14 7 7 0 0 0 0 14zM8.21 13.89L7 23l5-3 5 3-1.21-9.12",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},crown:{viewBox:"0 0 24 24",path:"M2 17l3-10 5 6 2-8 2 8 5-6 3 10H2zM4 21h16",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},podium:{viewBox:"0 0 24 24",path:"M5 10h4v12H5zM10 6h4v16h-4zM15 14h4v8h-4zM12 2v4M10 4h4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},stopwatch:{viewBox:"0 0 24 24",path:"M12 5a9 9 0 1 0 0 18 9 9 0 0 0 0-18zM12 9v5l3 3M10 2h4M21 6l-2-2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},whistle:{viewBox:"0 0 24 24",path:"M5 16a4 4 0 1 0 8 0 4 4 0 0 0-8 0zM2 12l7-4h8l3 4-3 4M18 8l4-4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},target:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM12 6a6 6 0 1 0 0 12 6 6 0 0 0 0-12zM12 10a2 2 0 1 0 0 4 2 2 0 0 0 0-4z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"boxing-glove":{viewBox:"0 0 24 24",path:"M5 8c0-3 2-5 5-5h4c3 0 5 2 5 5v5c0 4-3 7-7 7s-7-3-7-7V8zM9 5v4M12 20v2M9 12h6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},racket:{viewBox:"0 0 24 24",path:"M12 2a6 6 0 0 0-6 6v4a6 6 0 0 0 12 0V8a6 6 0 0 0-6-6zM12 18v4M8 8h8M8 12h8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},skate:{viewBox:"0 0 24 24",path:"M4 16V6a2 2 0 0 1 2-2h8l4 4v8M2 16h18v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-2zM6 20v2M16 20v2M10 10h4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},ski:{viewBox:"0 0 24 24",path:"M5 16l14-6M3 21l18-8M12 2a2 2 0 1 0 0 4 2 2 0 0 0 0-4zM12 8l-4 8M14 10l2 4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},surfboard:{viewBox:"0 0 24 24",path:"M21 3L3 21M17 3c3 3 4 8 1 15L3 21c7-3 12-2 15 1M12 12l-4 4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},mountain:{viewBox:"0 0 24 24",path:"M8 21l4-10 3 6 2-4 4 8H3l5-10 4 10z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},tent:{viewBox:"0 0 24 24",path:"M12 2L2 20h20L12 2zM12 2v18M7 14l5-6 5 6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},compass:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM16.24 7.76l-2.12 6.36-6.36 2.12 2.12-6.36z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},fishing:{viewBox:"0 0 24 24",path:"M18 2l-3 3v3l-4 4-5-2-4 4v5h5l4-4-2-5 4-4h3l3-3M12 22c-2 0-3-1-3-3M9 19c-2 0-3-1-3-3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}},Cs={building:{viewBox:"0 0 24 24",path:"M3 21h18M5 21V7l7-4 7 4v14M9 21v-4h6v4M9 9h.01M15 9h.01M9 13h.01M15 13h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},house:{viewBox:"0 0 24 24",path:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9zM9 22V12h6v10",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},home:{viewBox:"0 0 24 24",path:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},cabin:{viewBox:"0 0 24 24",path:"M2 20h20M4 20V10l8-8 8 8v10M10 20v-6h4v6M12 2v2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},apartment:{viewBox:"0 0 24 24",path:"M4 21V4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v17M8 6h2M14 6h2M8 10h2M14 10h2M8 14h2M14 14h2M10 21v-4h4v4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},office:{viewBox:"0 0 24 24",path:"M3 21h18M5 21V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16M9 21v-4h6v4M9 7h.01M15 7h.01M9 11h.01M15 11h.01M9 15h.01M15 15h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},store:{viewBox:"0 0 24 24",path:"M4 3h16l1 6H3l1-6zM3 9v10a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V9M10 21v-6h4v6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},warehouse:{viewBox:"0 0 24 24",path:"M3 21h18M4 21V8l8-5 8 5v13M9 17h6v4H9zM9 12h6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},factory:{viewBox:"0 0 24 24",path:"M2 21h20M5 21V11l6 4V9l6 4V5a2 2 0 0 1 2-2h0a2 2 0 0 1 2 2v16M8 21v-3M12 21v-3M16 21v-3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},hotel:{viewBox:"0 0 24 24",path:"M4 21V3a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v18M8 5h2M14 5h2M8 9h2M14 9h2M8 13h2M14 13h2M10 21v-4h4v4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},school:{viewBox:"0 0 24 24",path:"M2 22h20M12 2l10 6v14M2 8l10-6M12 8v14M4 10v12M20 10v12M8 14h.01M16 14h.01M10 22v-4h4v4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},university:{viewBox:"0 0 24 24",path:"M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},library:{viewBox:"0 0 24 24",path:"M4 21h16M5 21V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16M9 7h6M9 11h6M9 15h4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},museum:{viewBox:"0 0 24 24",path:"M2 20h20M4 20V10M20 20V10M12 2L2 8h20L12 2zM8 20v-6h3v6M13 20v-6h3v6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},court:{viewBox:"0 0 24 24",path:"M2 20h20M4 20V8l8-6 8 6v12M10 20v-6h4v6M6 10h12M12 4v6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},church:{viewBox:"0 0 24 24",path:"M18 22H6a2 2 0 0 1-2-2V9l8-7 8 7v11a2 2 0 0 1-2 2zM12 2v4M10 4h4M10 22v-5a2 2 0 0 1 4 0v5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},mosque:{viewBox:"0 0 24 24",path:"M3 21h18M5 21v-8c0-2 .5-4 2-6 1.5 2 2 4 2 6v8M15 21v-8c0-2 .5-4 2-6 1.5 2 2 4 2 6v8M12 3a4 4 0 0 1 4 4v14M12 3a4 4 0 0 0-4 4v14M12 1v2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},temple:{viewBox:"0 0 24 24",path:"M2 22h20M4 22V12h4v10M16 22V12h4v10M8 22V8h8v14M12 2l6 6H6l6-6M10 14h4M10 18h4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},castle:{viewBox:"0 0 24 24",path:"M2 22h20M4 22V10h4V6H6V2h3v2h2V2h2v2h2V2h3v4h-2v4h4v12M10 22v-5h4v5M4 6h4M16 6h4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},fortress:{viewBox:"0 0 24 24",path:"M2 20h20M4 20V8h16v12M8 8V4h2v4M14 8V4h2v4M4 4h4M16 4h4M8 20v-4h3v4M13 20v-4h3v4M7 12h2M15 12h2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},tower:{viewBox:"0 0 24 24",path:"M8 22V4a4 4 0 0 1 8 0v18M8 8h8M8 14h8M10 22v-4h4v4M12 1v1",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},lighthouse:{viewBox:"0 0 24 24",path:"M7 22l2-16h6l2 16M9 6V3a3 3 0 0 1 6 0v3M2 11h5M17 11h5M9 12h6M10 18h4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},bridge:{viewBox:"0 0 24 24",path:"M2 18h20M4 14c0-2 2-4 4-4s4 2 4 4c0-2 2-4 4-4s4 2 4 4M4 18v-4M20 18v-4M12 18v-4M8 10V6M16 10V6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},stadium:{viewBox:"0 0 24 24",path:"M2 16c0-3 4.5-5 10-5s10 2 10 5v2c0 3-4.5 5-10 5s-10-2-10-5v-2zM2 12c0-3 4.5-5 10-5s10 2 10 5M12 3v4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},airport:{viewBox:"0 0 24 24",path:"M21 16v-2l-8-5V3.5a1.5 1.5 0 0 0-3 0V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"train-station":{viewBox:"0 0 24 24",path:"M4 21h16M6 17V7a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v10M8 21v-4h3v4M13 21v-4h3v4M12 2v3M9 9h6M9 13h6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},monument:{viewBox:"0 0 24 24",path:"M8 22h8M10 22V10L12 2l2 8v12M6 18h12M8 14h8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},obelisk:{viewBox:"0 0 24 24",path:"M7 22l2-18h6l2 18M12 2l-1 2h2l-1-2M9 8h6M9 14h6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},arch:{viewBox:"0 0 24 24",path:"M4 22V10a8 8 0 0 1 16 0v12M4 8h16M4 14h16M8 22v-8M16 22v-8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},windmill:{viewBox:"0 0 24 24",path:"M7 22l3-10h4l3 10M12 12V3M12 6l6-3M12 6L6 3M12 6l6 3M12 6L6 9M10 16h4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},skyscraper:{viewBox:"0 0 24 24",path:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18M2 22h20M10 6h4M10 10h4M10 14h4M10 18h4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},pyramid:{viewBox:"0 0 24 24",path:"M12 2L2 22h20L12 2zM12 2v20M7 12h10",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},dome:{viewBox:"0 0 24 24",path:"M2 22h20M4 22v-6a8 8 0 0 1 16 0v6M12 2v6M12 2a3 3 0 0 1 0 6M10 14h4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},barn:{viewBox:"0 0 24 24",path:"M3 21h18M5 21V11l7-8 7 8v10M10 21v-5h4v5M9 11h6M12 3v2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}},Es={smile:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM8 9h.01M16 9h.01M8 14s1.5 2 4 2 4-2 4-2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},grin:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM8 9h.01M16 9h.01M6 13a6 6 0 0 0 12 0H6z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},laugh:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM7 9c0-.6.4-1 1-1s1 .4 1 1M15 9c0-.6.4-1 1-1s1 .4 1 1M7 13h10a5 5 0 0 1-10 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},joy:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM7 9l2 1M15 9l2 1M6 13h12a6 6 0 0 1-12 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},wink:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM8 9h.01M14 9h4M8 14s1.5 2 4 2 4-2 4-2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},blush:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM8 9h.01M16 9h.01M8 14s1.5 2 4 2 4-2 4-2M5 13h2M17 13h2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"heart-eyes":{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM8 14s1.5 2 4 2 4-2 4-2M6.5 10c.5-1 1.5-2 2.5-1s-1 2.5-2.5 1zM15 10c.5-1 1.5-2 2.5-1s-1 2.5-2.5 1z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"star-eyes":{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM8 14s1.5 2 4 2 4-2 4-2M8 9l.5-1 .5 1 1-.5-.5 1 .5 1-1-.5-.5 1-.5-1-1 .5.5-1-.5-1zM16 9l.5-1 .5 1 1-.5-.5 1 .5 1-1-.5-.5 1-.5-1-1 .5.5-1-.5-1z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},sad:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM8 9h.01M16 9h.01M16 16s-1.5-2-4-2-4 2-4 2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},cry:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM8 9h.01M16 9h.01M16 16s-1.5-2-4-2-4 2-4 2M8 11v2M16 11v2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},sob:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM6 9l3 1M18 9l-3 1M16 17s-1.5-2-4-2-4 2-4 2M7 12l1 6M17 12l-1 6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},disappointed:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM6 8l4 2M18 8l-4 2M16 16s-1.5-2-4-2-4 2-4 2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},angry:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM6 8l4 2M18 8l-4 2M9 15h6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},rage:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM5 7l5 3M19 7l-5 3M9 16h6M9 16l1-2M15 16l-1-2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},annoyed:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM6 8l4 1M18 8l-4 1M8 9h.01M16 9h.01M9 15h6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},surprised:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM8 8v1M16 8v1M12 13a2 2 0 1 0 0 4 2 2 0 0 0 0-4z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},shocked:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM7 8l2 1M17 8l-2 1M12 13v5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},astonished:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM6 8l4 1M18 8l-4 1M12 12a3 3 0 1 0 0 6 3 3 0 0 0 0-6z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},thinking:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM8 9h.01M16 9h.01M10 15h4c0 1-1 2-2 2s-2-1-2-2zM19 9c1 0 2-1 2-2s-1-2-2-2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},confused:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM8 9h.01M16 9h.01M9 15c2-2 4 0 6-2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},neutral:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM8 9h.01M16 9h.01M8 15h8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},expressionless:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM7 9h3M14 9h3M8 15h8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},cool:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM5 10h5l1-2h2l1 2h5M5 10c0 1 1 2 2.5 2s2.5-1 2.5-2M14 10c0 1 1 2 2.5 2s2.5-1 2.5-2M8 16s1.5 2 4 2 4-2 4-2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},nerd:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM6 9a2 2 0 1 0 4 0 2 2 0 0 0-4 0zM14 9a2 2 0 1 0 4 0 2 2 0 0 0-4 0zM10 9h4M8 15s1.5 1 4 1 4-1 4-1",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},tongue:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM8 9h.01M16 9h.01M8 13h8M10 13v3c0 1 1 2 2 2s2-1 2-2v-3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},silly:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM7 9h2M17 9l-2-1M7 13c2 0 3 3 5 3s3-3 5-3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},zany:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM8 8v2M15 8l2 2M8 14h8c0 2-2 4-4 4s-4-2-4-4z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},sick:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM8 9h.01M16 9h.01M8 15c2 1 6-1 8 0M18 5c1.5 1.5 1.5 3.5 0 5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},sleepy:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM7 10c.5-.5 1.5-.5 2 0M15 10c.5-.5 1.5-.5 2 0M12 14a2 2 0 1 0 0 4 2 2 0 0 0 0-4zM18 4l2 2M20 4h-2v2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},dead:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM6 8l4 4M10 8l-4 4M14 8l4 4M18 8l-4 4M8 16h8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},mask:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM8 9h.01M16 9h.01M4 13h16M5 14c1 2 3 4 7 4s6-2 7-4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}},Ss={car:{viewBox:"0 0 24 24",path:"M5 11l1.5-4.5h11L19 11M5 17h1m13 0h1M6 13v4m12-4v4M5 17h14a1 1 0 001-1v-5H4v5a1 1 0 001 1z M7.5 6.5l.5 1h8l.5-1a1 1 0 00-1-1H8.5a1 1 0 00-1 1z M7 16a1 1 0 100-2 1 1 0 000 2z M17 16a1 1 0 100-2 1 1 0 000 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},truck:{viewBox:"0 0 24 24",path:"M1 3h15v13H1zM16 8h4l3 3v5h-7V8z M5.5 21a2.5 2.5 0 100-5 2.5 2.5 0 000 5z M18.5 21a2.5 2.5 0 100-5 2.5 2.5 0 000 5z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},van:{viewBox:"0 0 24 24",path:"M3 6h13v11H3z M16 6h2l3 4v7h-5V6z M7 20.5a1.5 1.5 0 100-3 1.5 1.5 0 000 3z M17 20.5a1.5 1.5 0 100-3 1.5 1.5 0 000 3z M3 10h13",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},motorcycle:{viewBox:"0 0 24 24",path:"M5 19a3 3 0 100-6 3 3 0 000 6z M19 19a3 3 0 100-6 3 3 0 000 6z M12 4l-3 7h5.5L18 8m-4 3l3 8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},bicycle:{viewBox:"0 0 24 24",path:"M5 19a3 3 0 100-6 3 3 0 000 6z M19 19a3 3 0 100-6 3 3 0 000 6z M12 11l2-5h3M12 19v-8m0 0L9 8M12 11l3-3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},bus:{viewBox:"0 0 24 24",path:"M4 6a2 2 0 012-2h12a2 2 0 012 2v11a3 3 0 01-3 3H7a3 3 0 01-3-3V6z M4 10h16M8 20v-2M16 20v-2M8 14h.01M16 14h.01M4 6h16",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},taxi:{viewBox:"0 0 24 24",path:"M5 11l1.5-4.5h11L19 11M5 17h1m13 0h1M6 13v4m12-4v4M5 17h14a1 1 0 001-1v-5H4v5a1 1 0 001 1z M9 4h6v2H9V4z M7 16a1 1 0 100-2 1 1 0 000 2z M17 16a1 1 0 100-2 1 1 0 000 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},parking:{viewBox:"0 0 24 24",path:"M4 4h16a2 2 0 012 2v12a2 2 0 01-2 2H4a2 2 0 01-2-2V6a2 2 0 012-2z M9 8v8M9 8h3.5a2.5 2.5 0 010 5H9",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},fuel:{viewBox:"0 0 24 24",path:"M3 4h10v12H3z M13 7h2a2 2 0 012 2v7a2 2 0 002 2M14 7V4M3 10h10M5 20v-4M11 20v-4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},garage:{viewBox:"0 0 24 24",path:"M2 9l10-7 10 7v11a2 2 0 01-2 2H4a2 2 0 01-2-2V9z M7 21V13h10v8M2 9h20",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},road:{viewBox:"0 0 24 24",path:"M6 4h2v16H6zM16 4h2v16h-2zM12 4v4M12 12v4M12 20v1",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},rocket:{viewBox:"0 0 24 24",path:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z M12 15l-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11A22.35 22.35 0 0 1 15 15z M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}};var As={code:{viewBox:"0 0 24 24",path:"M16 18l6-6-6-6M8 6l-6 6 6 6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"git-branch":{viewBox:"0 0 24 24",path:"M6 3v12M18 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM6 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM18 9c-3 0-6 3-6 6v3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},terminal:{viewBox:"0 0 24 24",path:"M4 17l6-6-6-6M12 19h8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},bold:{viewBox:"0 0 24 24",path:"M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6V4zm0 8h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6v-8z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},italic:{viewBox:"0 0 24 24",path:"M19 4h-9M14 20H5M15 4L9 20",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},underline:{viewBox:"0 0 24 24",path:"M6 3v7a6 6 0 0 0 6 6 6 6 0 0 0 6-6V3M4 21h16",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},strikethrough:{viewBox:"0 0 24 24",path:"M17.3 4.9c-2.3-.6-4.4-1-6.2-.9-2.7.1-5.3 1.1-6.6 3.1-.5.8-.7 1.7-.7 2.6 0 1.7.8 3.1 2 4M3 12h18M13 20c2 0 3.5-.5 4.5-1.5 1-.9 1.5-2.2 1.5-3.5 0-1.3-.5-2.5-1.4-3.4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"heading-1":{viewBox:"0 0 24 24",path:"M4 12h8m-8 6V6m8 12V6m5 6h3m0 0V6m0 6v6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"heading-2":{viewBox:"0 0 24 24",path:"M4 12h8m-8 6V6m8 12V6m5 10.5c0-2.5 4-2.5 4 0s-4 2.5-4 5m4 0h-4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"heading-3":{viewBox:"0 0 24 24",path:"M4 12h8m-8 6V6m8 12V6m5 4.5h3a1.5 1.5 0 0 1 0 3 1.5 1.5 0 0 1 0 3h-3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"list-bullet":{viewBox:"0 0 24 24",path:"M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"list-numbered":{viewBox:"0 0 24 24",path:"M10 6h11M10 12h11M10 18h11M4 6h1v4M4 10h2M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},quote:{viewBox:"0 0 24 24",path:"M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V20c0 1 0 1 1 1zM15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"code-inline":{viewBox:"0 0 24 24",path:"M16 18l6-6-6-6M8 6l-6 6 6 6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"code-block":{viewBox:"0 0 24 24",path:"M16 18l6-6-6-6M8 6l-6 6 6 6M14 4l-4 16",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"link-add":{viewBox:"0 0 24 24",path:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"image-add":{viewBox:"0 0 24 24",path:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},undo:{viewBox:"0 0 24 24",path:"M3 7v6h6M21 17a9 9 0 0 0-9-9 9 9 0 0 0-9 9",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},redo:{viewBox:"0 0 24 24",path:"M21 7v6h-6M3 17a9 9 0 0 1 9-9 9 9 0 0 1 9 9",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"text-left":{viewBox:"0 0 24 24",path:"M3 6h18M3 12h12M3 18h18",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"text-center":{viewBox:"0 0 24 24",path:"M3 6h18M6 12h12M3 18h18",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"text-right":{viewBox:"0 0 24 24",path:"M3 6h18M9 12h12M3 18h18",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},indent:{viewBox:"0 0 24 24",path:"M3 6h18M3 12h18M3 18h18M3 9l4 3-4 3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},outdent:{viewBox:"0 0 24 24",path:"M3 6h18M3 12h18M3 18h18M7 9l-4 3 4 3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},embed:{viewBox:"0 0 24 24",path:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10zM8 10h8M8 14h4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"clear-format":{viewBox:"0 0 24 24",path:"M4 7V4h16v3M9 20h6M12 4v16",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}};const $s={...us,...ps,...ms,...fs,...gs,...vs,...ys,...bs,...ks,..._s,...ws,...Ms,...xs,...Ls,...Cs,...Es,...Ss,...As},zs={ui:{name:"UI",description:"Core user interface icons",icons:Object.keys(us)},communication:{name:"Communication",description:"Messaging and notifications",icons:Object.keys(ps)},media:{name:"Media",description:"Audio, video, and images",icons:Object.keys(ms)},files:{name:"Files",description:"Documents and file operations",icons:Object.keys(fs)},social:{name:"Social",description:"Social interactions and sharing",icons:Object.keys(gs)},commerce:{name:"Commerce",description:"Shopping and payments",icons:Object.keys(vs)},status:{name:"Status",description:"Indicators and alerts",icons:Object.keys(ys)},navigation:{name:"Navigation",description:"Directional and navigation",icons:Object.keys(bs)},seasonal:{name:"Seasonal",description:"Festive and holiday icons",icons:Object.keys(ks)},weather:{name:"Weather",description:"Weather conditions and meteorology",icons:Object.keys(_s)},devices:{name:"Devices",description:"Electronic devices and hardware",icons:Object.keys(ws)},finance:{name:"Finance",description:"Financial and charts",icons:Object.keys(Ms)},health:{name:"Health",description:"Medical and wellness",icons:Object.keys(xs)},sport:{name:"Sport",description:"Sports and fitness",icons:Object.keys(Ls)},buildings:{name:"Buildings",description:"Architecture and structures",icons:Object.keys(Cs)},emojis:{name:"Emojis",description:"Emoji expressions and faces",icons:Object.keys(Es)},transport:{name:"Transport",description:"Vehicles and transportation",icons:Object.keys(Ss)},code:{name:"Code & Editor",description:"Text editing, formatting, and code icons",icons:Object.keys(As)}},js="http://www.w3.org/2000/svg";const Bs=new class{constructor(){this._icons={...$s},this._categories={...zs}}render(e,t={}){const n=this._icons[e];if(!n)return console.warn(`Icon "${e}" not found`),null;const{size:o=24,class:s="",colour:i=null,color:r=null,attrs:a={}}=t,l=document.createElementNS(js,"svg");l.setAttribute("viewBox",n.viewBox||"0 0 24 24"),l.setAttribute("width",o),l.setAttribute("height",o),l.setAttribute("fill",n.fill||"none"),l.setAttribute("aria-hidden","true");const d=["dm-icon"];if(s&&d.push(s),l.setAttribute("class",d.join(" ")),n.stroke&&l.setAttribute("stroke",i||r||n.stroke),n.strokeWidth&&l.setAttribute("stroke-width",n.strokeWidth),n.strokeLinecap&&l.setAttribute("stroke-linecap",n.strokeLinecap),n.strokeLinejoin&&l.setAttribute("stroke-linejoin",n.strokeLinejoin),(i||r)&&"currentColor"===n.fill&&l.setAttribute("fill",i||r),Object.entries(a).forEach(([e,t])=>{l.setAttribute(e,t)}),n.path){const e=document.createElementNS(js,"path");e.setAttribute("d",n.path),"currentColor"===n.fill&&e.setAttribute("fill",i||r||"currentColor"),l.appendChild(e)}return n.paths&&n.paths.forEach(e=>{const t=document.createElementNS(js,"path");t.setAttribute("d",e),"currentColor"===n.fill&&t.setAttribute("fill",i||r||"currentColor"),l.appendChild(t)}),l}html(e,t={}){const n=this.render(e,t);if(!n)return"";const o=document.createElement("div");return o.appendChild(n),o.innerHTML}inject(e,t,n={}){const{position:o="prepend",...s}=n,i="string"==typeof e?document.querySelector(e):e;if(!i)return console.warn(`Target element not found: ${e}`),null;const r=this.render(t,s);if(!r)return null;switch(o){case"append":i.appendChild(r);break;case"replace":i.innerHTML="",i.appendChild(r);break;default:i.insertBefore(r,i.firstChild)}return r}scan(e=document){const t="string"==typeof e?document.querySelector(e):e;if(!t)return 0;const n=t.querySelectorAll("[data-icon]:not([data-icon-processed]):not([data-icon-processing])");let o=0;return n.forEach(e=>{if("svg"===e.tagName.toLowerCase()||e.hasAttribute("data-icon-processed")||e.querySelector("svg"))return;const t=e.dataset.icon,n=parseInt(e.dataset.iconSize,10)||24,s=e.dataset.iconColour||e.dataset.iconColor||null,i=e.dataset.iconClass||"",r=this.render(t,{size:n,colour:s,class:i});if(r){const n=e.className;n&&r.classList.add(...n.split(" ").filter(e=>e)),r.setAttribute("data-icon",t),r.setAttribute("data-icon-processed","true"),r.setAttribute("data-original-icon",t),r.setAttribute("data-icon-converted",Date.now().toString()),e.replaceWith(r),o++}else e.setAttribute("data-icon-processed","true")}),o}register(e,t){return e&&t?(t.viewBox||(t.viewBox="0 0 24 24"),t.path||t.paths?(this._icons[e]=t,this._categories.custom||(this._categories.custom={name:"Custom",description:"Custom registered icons",icons:[]}),this._categories.custom.icons.push(e),this):(console.warn(`Icon "${e}" must have a path or paths property`),this)):(console.warn("Invalid icon registration: name and definition required"),this)}unregister(e){if(this._icons[e]){if(delete this._icons[e],this._categories.custom){const t=this._categories.custom.icons.indexOf(e);t>-1&&this._categories.custom.icons.splice(t,1)}return!0}return!1}has(e){return!!this._icons[e]}get(e){return this._icons[e]||null}list(e=null){return e&&this._categories[e]?[...this._categories[e].icons]:Object.keys(this._icons)}listCategories(){return{...this._categories}}count(){return Object.keys(this._icons).length}search(e){const t=e.toLowerCase();return Object.keys(this._icons).filter(e=>e.toLowerCase().includes(t))}createSprite(){const e=document.createElementNS(js,"svg");return e.setAttribute("xmlns",js),e.style.display="none",Object.entries(this._icons).forEach(([t,n])=>{const o=document.createElementNS(js,"symbol");if(o.setAttribute("id",`dm-icon-${t}`),o.setAttribute("viewBox",n.viewBox||"0 0 24 24"),n.path){const e=document.createElementNS(js,"path");e.setAttribute("d",n.path),n.fill&&e.setAttribute("fill",n.fill),n.stroke&&(e.setAttribute("stroke",n.stroke),n.strokeWidth&&e.setAttribute("stroke-width",n.strokeWidth),n.strokeLinecap&&e.setAttribute("stroke-linecap",n.strokeLinecap),n.strokeLinejoin&&e.setAttribute("stroke-linejoin",n.strokeLinejoin)),o.appendChild(e)}n.paths&&n.paths.forEach(e=>{const t=document.createElementNS(js,"path");t.setAttribute("d",e),n.fill&&t.setAttribute("fill",n.fill),n.stroke&&t.setAttribute("stroke",n.stroke),o.appendChild(t)}),e.appendChild(o)}),e}use(e,t={}){if(!this._icons[e])return console.warn(`Icon "${e}" not found`),null;const{size:n=24,class:o=""}=t,s=document.createElementNS(js,"svg");s.setAttribute("width",n),s.setAttribute("height",n),s.setAttribute("aria-hidden","true");const i=["dm-icon"];o&&i.push(o),s.setAttribute("class",i.join(" "));const r=document.createElementNS(js,"use");return r.setAttributeNS("http://www.w3.org/1999/xlink","href",`#dm-icon-${e}`),s.appendChild(r),s}};class Ts{static stripeColors={none:"transparent",lighter:"var(--dm-gray-100, #f8f9fa)",light:"var(--dm-gray-200, #e9ecef)",medium:"var(--dm-gray-300, #dee2e6)",dark:"var(--dm-gray-400, #ced4da)","primary-tint":"rgba(100, 149, 237, 0.05)","success-tint":"rgba(40, 167, 69, 0.05)","warning-tint":"rgba(255, 193, 7, 0.05)","danger-tint":"rgba(220, 53, 69, 0.05)","info-tint":"rgba(23, 162, 184, 0.05)",default:"var(--dm-table-stripe-bg, #f9f9f9)"};static hoverColors={none:"transparent",lighter:"var(--dm-gray-200, #e9ecef)",light:"var(--dm-gray-300, #dee2e6)",medium:"var(--dm-gray-400, #ced4da)",dark:"var(--dm-gray-500, #adb5bd)",default:"var(--dm-hover-bg, #f0f0f0)"};constructor(e,t={}){this.element="string"==typeof e?document.querySelector(e):e,this.options={data:[],columns:[],rowKey:"id",sortable:!0,multiSort:!1,defaultSort:null,filterable:!0,searchable:!0,searchPlaceholder:"Search...",pagination:!0,pageSize:10,pageSizeOptions:[10,25,50,100],selectable:!1,selectionMode:"single",editable:!1,editMode:"cell",resizable:!0,striped:!0,hover:!0,bordered:!0,responsive:!0,evenRowColor:null,oddRowColor:null,hoverColor:null,classes:{wrapper:"domma-table-wrapper",table:"domma-table",header:"domma-table-header",body:"domma-table-body",row:"domma-table-row",cell:"domma-table-cell",selected:"domma-table-selected",sorted:"domma-table-sorted",sortAsc:"domma-table-sort-asc",sortDesc:"domma-table-sort-desc",pagination:"domma-table-pagination",search:"domma-table-search"},exportPanel:!1,exportOptions:["copy","csv","excel","json"],columnToggle:!1,regexSearch:!1,persistSettings:!1,storageKey:null,onSort:null,onFilter:null,onPageChange:null,onSelect:null,onEdit:null,onRender:null,onExport:null,...t},this._originalData=[...this.options.data],this._data=[...this.options.data],this._filteredData=[...this._data],this._currentPage=1,this._pageSize=this.options.pageSize,this._sorts=[],this._filters=[],this._searchQuery="",this._selected=new Set,this._editingCell=null,this._eventListeners=new Map,this._columnDropdownOpen=!1,this._searchIsRegex=!1,this._columns=this.options.columns.map(e=>({key:e.key||e,title:e.title||e.key||e,sortable:!1!==e.sortable&&this.options.sortable,filterable:!1!==e.filterable,editable:e.editable||!1,width:e.width||null,render:e.render||null,filterOptions:e.filterOptions||null,visible:!1!==e.visible})),this.options.persistSettings&&this._loadSettings(),this._init()}_init(){this.element&&(this.options.defaultSort&&(this._sorts=[this.options.defaultSort]),this.render())}_resolveColor(e,t,n){return e?t[e]?t[e]:e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")||e.startsWith("var(")?e:n:n}_getRowColors(e){const t=this.options;if(!t.striped)return{background:"transparent",hover:t.hover?this._resolveColor(t.hoverColor,Ts.hoverColors,Ts.hoverColors.default):"transparent"};const n=e%2==1,o=this._resolveColor(t.evenRowColor,Ts.stripeColors,"transparent"),s=this._resolveColor(t.oddRowColor,Ts.stripeColors,Ts.stripeColors.default);return{background:n?s:o,hover:t.hover?this._resolveColor(t.hoverColor,Ts.hoverColors,Ts.hoverColors.default):null}}setData(e){return this._originalData=[...e],this._data=[...e],this._applyFiltersAndSort(),this._currentPage=1,this.render(),this}getData(){return[...this._getPageData()]}getFilteredData(){return[...this._filteredData]}getOriginalData(){return[...this._originalData]}addRow(e){return this._originalData.push(e),this._data.push(e),this._applyFiltersAndSort(),this.render(),this}updateRow(e,t){const n=this._findRowIndex(e);return-1!==n&&(this._originalData[n]={...this._originalData[n],...t},this._data[n]={...this._data[n],...t},this._applyFiltersAndSort(),this.render()),this}removeRow(e){const t=this._findRowIndex(e);return-1!==t&&(this._originalData.splice(t,1),this._data.splice(t,1),this._applyFiltersAndSort(),this.render()),this}_findRowIndex(e){const t=this.options.rowKey;return"number"==typeof e?e:this._originalData.findIndex(n=>n[t]===e)}sort(e,t="asc"){return this._sorts=[{column:e,direction:t}],this._applyFiltersAndSort(),this.render(),this._saveSettings(),this.options.onSort&&this.options.onSort({column:e,direction:t,sorts:this._sorts}),this}sortMultiple(e){return this._sorts=e,this._applyFiltersAndSort(),this.render(),this._saveSettings(),this.options.onSort&&this.options.onSort({sorts:this._sorts}),this}clearSort(){return this._sorts=[],this._applyFiltersAndSort(),this.render(),this._saveSettings(),this}_applySort(e){return 0===this._sorts.length?e:[...e].sort((e,t)=>{for(const n of this._sorts){const{column:o,direction:s}=n,i=e[o],r=t[o];let a=0;if(null==i?a=1:null==r||i<r?a=-1:i>r&&(a=1),0!==a)return"desc"===s?-a:a}return 0})}search(e){return this._searchQuery=this._searchIsRegex?e.trim():e.toLowerCase().trim(),this._applyFiltersAndSort(),this._currentPage=1,this.render(),this.options.onFilter&&this.options.onFilter({query:e,type:"search",isRegex:this._searchIsRegex}),this}setSearchMode(e){return this._searchIsRegex=e,this._searchQuery&&(this._applyFiltersAndSort(),this.render()),this}toggleSearchMode(){return this.setSearchMode(!this._searchIsRegex)}filter(e,t,n="equals"){return this._filters=this._filters.filter(t=>t.column!==e),null!=t&&""!==t&&this._filters.push({column:e,value:t,operator:n}),this._applyFiltersAndSort(),this._currentPage=1,this.render(),this.options.onFilter&&this.options.onFilter({column:e,value:t,operator:n,type:"column"}),this}filterBy(e){return this._customFilter=e,this._applyFiltersAndSort(),this._currentPage=1,this.render(),this}clearFilters(){return this._filters=[],this._searchQuery="",this._customFilter=null,this._applyFiltersAndSort(),this._currentPage=1,this.render(),this}_applyFilters(e){let t=e;if(this._searchQuery)if(this._searchIsRegex)try{const e=new RegExp(this._searchQuery,"i");t=t.filter(t=>this._columns.some(n=>{const o=t[n.key];return null!=o&&e.test(String(o))}))}catch(e){t=[]}else t=t.filter(e=>this._columns.some(t=>{const n=e[t.key];return null!=n&&String(n).toLowerCase().includes(this._searchQuery)}));for(const e of this._filters)t=t.filter(t=>{const n=t[e.column];return this._matchFilter(n,e.value,e.operator)});return this._customFilter&&(t=t.filter(this._customFilter)),t}_matchFilter(e,t,n){if(null==e)return!1;const o=String(e).toLowerCase(),s=String(t).toLowerCase();switch(n){case"equals":default:return o===s;case"contains":return o.includes(s);case"startsWith":return o.startsWith(s);case"endsWith":return o.endsWith(s);case"gt":return Number(e)>Number(t);case"lt":return Number(e)<Number(t);case"gte":return Number(e)>=Number(t);case"lte":return Number(e)<=Number(t);case"between":const[n,i]=t,r=Number(e);return r>=n&&r<=i;case"in":return t.includes(e)}}_applyFiltersAndSort(){this._filteredData=this._applyFilters(this._data),this._filteredData=this._applySort(this._filteredData)}page(e){const t=this._getTotalPages();return this._currentPage=Math.max(1,Math.min(e,t)),this.render(),this.options.onPageChange&&this.options.onPageChange(this.pageInfo()),this}pageSize(e){return this._pageSize=e,this._currentPage=1,this.render(),this._saveSettings(),this}nextPage(){return this.page(this._currentPage+1)}prevPage(){return this.page(this._currentPage-1)}firstPage(){return this.page(1)}lastPage(){return this.page(this._getTotalPages())}pageInfo(){const e=this._getTotalPages();return{page:this._currentPage,pageSize:this._pageSize,totalPages:e,totalRows:this._filteredData.length,startRow:(this._currentPage-1)*this._pageSize+1,endRow:Math.min(this._currentPage*this._pageSize,this._filteredData.length)}}_getTotalPages(){return this.options.pagination&&Math.ceil(this._filteredData.length/this._pageSize)||1}_getPageData(){if(!this.options.pagination)return this._filteredData;const e=(this._currentPage-1)*this._pageSize,t=e+this._pageSize;return this._filteredData.slice(e,t)}select(e){if(!this.options.selectable)return this;const t=this.options.rowKey,n="object"==typeof e?e[t]:e;return"single"===this.options.selectionMode&&this._selected.clear(),this._selected.add(n),this.render(),this.options.onSelect&&this.options.onSelect(this.getSelected()),this}deselect(e){const t=this.options.rowKey,n="object"==typeof e?e[t]:e;return this._selected.delete(n),this.render(),this.options.onSelect&&this.options.onSelect(this.getSelected()),this}toggleSelect(e){const t=this.options.rowKey,n="object"==typeof e?e[t]:e;return this._selected.has(n)?this.deselect(e):this.select(e),this}selectAll(){if(!this.options.selectable||"single"===this.options.selectionMode)return this;const e=this.options.rowKey;for(const t of this._filteredData)this._selected.add(t[e]);return this.render(),this.options.onSelect&&this.options.onSelect(this.getSelected()),this}deselectAll(){return this._selected.clear(),this.render(),this.options.onSelect&&this.options.onSelect([]),this}getSelected(){const e=this.options.rowKey;return this._filteredData.filter(t=>this._selected.has(t[e]))}isSelected(e){const t=this.options.rowKey,n="object"==typeof e?e[t]:e;return this._selected.has(n)}_getStorageKey(){return this.options.storageKey||(this.element.id?`domma-table-${this.element.id}`:"domma-table-default")}_loadSettings(){try{const e=this._getStorageKey(),t=J.get(e);t&&t.columns&&t.columns.forEach(e=>{const t=this._columns.find(t=>t.key===e.key);t&&(t.visible=e.visible,e.width&&(t.width=e.width))}),t&&t.pageSize&&this.options.pagination&&(this._pageSize=t.pageSize,this.options.pageSize=t.pageSize),t&&t.sorts&&this.options.sortable&&(this._sorts=t.sorts)}catch(e){console.warn("Failed to load table settings:",e)}}_saveSettings(){if(this.options.persistSettings)try{const e=this._getStorageKey(),t={columns:this._columns.map(e=>({key:e.key,visible:e.visible,width:e.width})),pageSize:this._pageSize,sorts:this._sorts,timestamp:Date.now()};J.set(e,t)}catch(e){console.warn("Failed to save table settings:",e)}}clearSettings(){if(this.options.persistSettings){const e=this._getStorageKey();J.remove(e)}}showColumn(e){const t=this._columns.find(t=>t.key===e);return t&&(t.visible=!0,this.render(),this._saveSettings()),this}hideColumn(e){const t=this._columns.find(t=>t.key===e);return t&&(t.visible=!1,this.render(),this._saveSettings()),this}toggleColumn(e){const t=this._columns.find(t=>t.key===e);return t&&(t.visible=!t.visible,this.render(),this._saveSettings()),this}getVisibleColumns(){return this._columns.filter(e=>e.visible)}getHiddenColumns(){return this._columns.filter(e=>!e.visible)}resizeColumn(e,t){const n=this._columns.find(t=>t.key===e);return n&&(n.width=t,this.render()),this}getColumns(){return[...this._columns]}editCell(e,t){return this.options.editable?(this._editingCell={rowIndex:e,column:t},this.render(),this):this}saveEdits(){return this._editingCell=null,this.render(),this}cancelEdits(){return this._editingCell=null,this.render(),this}toCSV(e={}){const{columns:t=this._columns.filter(e=>e.visible),includeHeaders:n=!0}=e,o=[],s=this._getExportData();n&&o.push(t.map(e=>`"${e.title}"`).join(","));for(const e of s){const n=t.map(t=>{const n=e[t.key];return null==n?'""':`"${String(n).replace(/"/g,'""')}"`});o.push(n.join(","))}return o.join("\n")}_getExportData(){const e=this.getSelected();return e.length>0?e:this._filteredData}toJSON(e={}){const{columns:t=this._columns.filter(e=>e.visible),pretty:n=!1}=e,o=t.map(e=>e.key),s=this._getExportData().map(e=>{const t={};for(const n of o)t[n]=e[n];return t});return n?JSON.stringify(s,null,2):JSON.stringify(s)}download(e,t){let n,o;switch(e){case"csv":n=this.toCSV(),o="text/csv",t=t||"data.csv";break;case"excel":n=this.toExcel(),o="application/vnd.ms-excel",t=t||"data.xls";break;default:n=this.toJSON({pretty:!0}),o="application/json",t=t||"data.json"}const s=new Blob([n],{type:o}),i=URL.createObjectURL(s),r=document.createElement("a");if(r.href=i,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(i),this.options.onExport){const n=this._getExportData(),o=this.getSelected();this.options.onExport({format:e,filename:t,rowCount:n.length,selectedOnly:o.length>0})}}toExcel(e={}){const{columns:t=this._columns.filter(e=>e.visible)}=e,n=this._getExportData();let o='\n <html xmlns:o="urn:schemas-microsoft-com:office:office"\n xmlns:x="urn:schemas-microsoft-com:office:excel">\n <head>\n <meta charset="UTF-8">\n \x3c!--[if gte mso 9]>\n <xml>\n <x:ExcelWorkbook>\n <x:ExcelWorksheets>\n <x:ExcelWorksheet>\n <x:Name>Data</x:Name>\n <x:WorksheetOptions>\n <x:DisplayGridlines/>\n </x:WorksheetOptions>\n </x:ExcelWorksheet>\n </x:ExcelWorksheets>\n </x:ExcelWorkbook>\n </xml>\n <![endif]--\x3e\n <style>\n table { border-collapse: collapse; }\n th, td { border: 1px solid #000; padding: 8px; }\n th { background: #f0f0f0; font-weight: bold; }\n </style>\n </head>\n <body>\n <table>\n <thead>\n <tr>';for(const e of t)o+=`<th>${this._escapeHtml(e.title)}</th>`;o+="</tr></thead><tbody>";for(const e of n){o+="<tr>";for(const n of t){const t=e[n.key];o+=`<td>${null!=t?this._escapeHtml(String(t)):""}</td>`}o+="</tr>"}return o+="</tbody></table></body></html>",o}async copyToClipboard(e="text"){let t;const n=this._getExportData();if("json"===e)t=this.toJSON({pretty:!0});else if("csv"===e)t=this.toCSV();else{const e=this._columns.filter(e=>e.visible),o=[];o.push(e.map(e=>e.title).join("\t"));for(const t of n)o.push(e.map(e=>t[e.key]??"").join("\t"));t=o.join("\n")}return await c.copyToClipboard(t),this.options.onExport&&this.options.onExport({format:"clipboard",rowCount:this._filteredData.length}),this}_escapeHtml(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}render(){if(!this.element)return this;const e=this.options,t=e.classes,n=this._columns.filter(e=>e.visible),o=this._getPageData();this._restoreIconsBeforeRebuild(),this.element.innerHTML="",this._clearEventListeners();const s=document.createElement("div");s.className=t.wrapper;const i=document.createElement("div");if(i.className="domma-table-toolbar",e.searchable){const t=document.createElement("div");t.className="domma-table-search-wrapper";const n=document.createElement("input");if(n.type="text",n.className="domma-table-search-input"+(this._searchIsRegex?" regex-mode":""),n.placeholder=this._searchIsRegex?"Regex pattern...":e.searchPlaceholder,n.value=this._searchQuery,this._addEventHandler(n,"input",c.debounce(e=>{this.search(e.target.value)},300)),t.appendChild(n),e.regexSearch){const e=document.createElement("button");e.type="button",e.className="domma-table-regex-button"+(this._searchIsRegex?" active":""),e.title=this._searchIsRegex?"Regex mode (click for text)":"Text mode (click for regex)",e.innerHTML=".*",this._addEventHandler(e,"click",()=>{this._searchIsRegex=!this._searchIsRegex,this._searchQuery&&(this._searchQuery=this._searchIsRegex?n.value.trim():n.value.toLowerCase().trim(),this._applyFiltersAndSort()),this.render()}),t.appendChild(e)}i.appendChild(t)}if(e.columnToggle){const e=document.createElement("div");e.className="domma-table-column-toggle";const t=document.createElement("button");t.type="button",t.className="domma-table-column-button",t.innerHTML=`${Bs.html("columns",{size:16})} Columns`;const n=document.createElement("div");n.className="domma-column-dropdown"+(this._columnDropdownOpen?" show":"");for(const e of this._columns){const t=document.createElement("label");t.className="domma-column-toggle-item";const o=document.createElement("span");o.className="domma-column-toggle-label",o.textContent=e.title;const s=document.createElement("div");s.className="domma-toggle-switch";const i=document.createElement("input");i.type="checkbox",i.checked=e.visible,i.style.cssText="opacity: 0; width: 0; height: 0; position: absolute;";const r=document.createElement("span");r.className="domma-toggle-track"+(e.visible?" active":"");const a=document.createElement("span");a.className="domma-toggle-knob"+(e.visible?" active":""),r.appendChild(a),s.appendChild(i),s.appendChild(r),this._addEventHandler(t,"click",t=>{t.preventDefault(),t.stopPropagation(),e.visible=!e.visible,e.visible?(r.classList.add("active"),a.classList.add("active")):(r.classList.remove("active"),a.classList.remove("active")),i.checked=e.visible,this._columnDropdownOpen=!0,this.render(),this._saveSettings()}),t.appendChild(o),t.appendChild(s),n.appendChild(t)}this._addEventHandler(t,"click",e=>{e.stopPropagation(),this._columnDropdownOpen=!this._columnDropdownOpen,this._columnDropdownOpen?n.classList.add("show"):n.classList.remove("show")}),this._addEventHandler(document,"click",()=>{this._columnDropdownOpen&&(this._columnDropdownOpen=!1,n.classList.remove("show"))}),this._addEventHandler(n,"click",e=>{e.stopPropagation()}),e.appendChild(t),e.appendChild(n),i.appendChild(e)}if(e.exportPanel){const t=document.createElement("div");t.className="domma-table-export-wrapper";let n=!1;const o=document.createElement("div");o.className="domma-export-mode-toggle";const s=document.createElement("span");s.className="domma-export-mode-label active",s.textContent="Copy";const r=document.createElement("label");r.className="domma-export-toggle-switch";const a=document.createElement("input");a.type="checkbox",a.className="domma-export-toggle-input";const l=document.createElement("span");l.className="domma-export-toggle-slider";const d=document.createElement("span");d.className="domma-export-toggle-knob",l.appendChild(d),r.appendChild(a),r.appendChild(l);const c=document.createElement("span");c.className="domma-export-mode-label",c.textContent="Download";const h=()=>{n?(l.classList.add("active"),d.classList.add("active"),s.classList.remove("active"),c.classList.add("active")):(l.classList.remove("active"),d.classList.remove("active"),s.classList.add("active"),c.classList.remove("active"))};this._addEventHandler(a,"change",()=>{n=a.checked,h()}),h(),o.appendChild(s),o.appendChild(r),o.appendChild(c),t.appendChild(o);const u=document.createElement("span");u.className="domma-export-separator",t.appendChild(u);const p={text:{label:"Text",icon:Bs.html("clipboard",{size:16}),format:"text"},csv:{label:"CSV",icon:Bs.html("document",{size:16}),format:"csv"},excel:{label:"Excel",icon:Bs.html("grid",{size:16}),format:"excel"},json:{label:"JSON",icon:Bs.html("file-code",{size:16}),format:"json"}},m=e.exportOptions.map(e=>"copy"===e?"text":e);for(const e of m){const o=p[e];if(!o)continue;const s=document.createElement("button");s.type="button",s.className="domma-export-button",s.setAttribute("data-export",e),s.innerHTML=`${o.icon} ${o.label}`;const i=(e,t=!0)=>{const n=s.innerHTML;s.innerHTML=e,s.classList.add(t?"success":"error"),setTimeout(()=>{s.innerHTML=n,s.classList.remove("success","error")},1500)};this._addEventHandler(s,"click",()=>{const e=this.getSelected(),t=e.length>0?e.length:this._filteredData.length,s=e.length>0?` (${t} selected)`:` (${t} rows)`;if(n){const e="text"===o.format?"csv":o.format;this.download(e),i("✓ Downloaded!"+s)}else{const e="excel"===o.format?"text":o.format;this.copyToClipboard(e),i("✓ Copied!"+s)}}),t.appendChild(s)}i.appendChild(t)}(e.searchable||e.columnToggle||e.exportPanel)&&s.appendChild(i);const r=document.createElement("table");r.className=t.table,r.style.cssText="width: 100%; border-collapse: collapse;";const a=document.createElement("thead");a.className=t.header;const l=document.createElement("tr");if(e.selectable&&"multiple"===e.selectionMode){const e=document.createElement("th");e.style.cssText="padding: 12px; border: 1px solid var(--dm-border, #ddd); background: var(--dm-table-header-bg, var(--dm-background-alt, #f8f9fa)); width: 40px;";const t=document.createElement("input");t.type="checkbox",t.checked=this._selected.size>0&&this._selected.size===o.length,this._addEventHandler(t,"change",()=>{t.checked?this.selectAll():this.deselectAll()}),e.appendChild(t),l.appendChild(e)}for(const e of n){const n=document.createElement("th");n.style.cssText="padding: 12px; border: 1px solid var(--dm-border, #ddd); background: var(--dm-table-header-bg, var(--dm-background-alt, #f8f9fa)); text-align: left;",e.width&&(n.style.width="number"==typeof e.width?e.width+"px":e.width);const o=this._sorts.find(t=>t.column===e.key);o&&(n.classList.add(t.sorted),n.classList.add("asc"===o.direction?t.sortAsc:t.sortDesc)),e.sortable?(n.style.cursor="pointer",n.innerHTML=`${e.title} <span style="opacity: 0.5">${o?"asc"===o.direction?"▲":"▼":"⇅"}</span>`,this._addEventHandler(n,"click",()=>{const t=this._sorts.find(t=>t.column===e.key),n="asc"===t?.direction?"desc":"asc";this.sort(e.key,n)})):n.textContent=e.title,l.appendChild(n)}a.appendChild(l),r.appendChild(a);const d=document.createElement("tbody");d.className=t.body;const h=e.rowKey;if(o.forEach((o,s)=>{const i=document.createElement("tr");i.className=t.row;const r=this._getRowColors(s);if(i.style.background=r.background,e.hover&&r.hover){i.style.transition="background 0.2s";const e=r.background;this._addEventHandler(i,"mouseenter",()=>i.style.background=r.hover),this._addEventHandler(i,"mouseleave",()=>i.style.background=e)}if(this._selected.has(o[h])&&(i.classList.add(t.selected),i.style.background="var(--dm-primary-light, #e3f2fd)"),e.selectable&&"multiple"===e.selectionMode){const e=document.createElement("td");e.style.cssText="padding: 12px; border: 1px solid var(--dm-border, #ddd);";const t=document.createElement("input");t.type="checkbox",t.checked=this._selected.has(o[h]),this._addEventHandler(t,"change",()=>{this.toggleSelect(o[h])}),e.appendChild(t),i.appendChild(e)}e.selectable&&"single"===e.selectionMode&&(i.style.cursor="pointer",this._addEventHandler(i,"click",()=>{this.toggleSelect(o[h])}));for(const r of n){const n=document.createElement("td");n.className=t.cell,n.style.cssText="padding: 12px; border: 1px solid var(--dm-border, #ddd);";if(this._editingCell&&this._editingCell.rowIndex===s&&this._editingCell.column===r.key&&r.editable){const t=document.createElement("input");t.type="text",t.value=o[r.key]||"",t.style.cssText="width: 100%; padding: 4px; border: 1px solid var(--dm-primary, #007bff);",this._addEventHandler(t,"blur",()=>{this.updateRow(o[h],{[r.key]:t.value}),this.saveEdits(),e.onEdit&&e.onEdit({row:o,column:r.key,oldValue:o[r.key],newValue:t.value})}),this._addEventHandler(t,"keydown",e=>{"Enter"===e.key?t.blur():"Escape"===e.key&&this.cancelEdits()}),n.appendChild(t),setTimeout(()=>t.focus(),0)}else r.render?n.innerHTML=r.render(o[r.key],o,s):n.textContent=o[r.key]??"",r.editable&&e.editable&&(n.style.cursor="pointer",this._addEventHandler(n,"dblclick",()=>{this.editCell(s,r.key)}));i.appendChild(n)}d.appendChild(i)}),r.appendChild(d),s.appendChild(r),e.pagination){const n=document.createElement("div");n.className=t.pagination,n.style.cssText="display: flex; justify-content: space-between; align-items: center; margin-top: 15px; padding: 10px 0;";const o=this.pageInfo(),i=document.createElement("span");i.textContent=`Showing ${o.startRow}-${o.endRow} of ${o.totalRows}`;const r=document.createElement("span");r.innerHTML="Show ";const a=document.createElement("select");a.className="form-select",a.style.cssText="width: auto; display: inline-block; margin: 0 5px;";for(const t of e.pageSizeOptions){const e=document.createElement("option");e.value=t,e.textContent=t,t===this._pageSize&&(e.selected=!0),a.appendChild(e)}this._addEventHandler(a,"change",()=>{this.pageSize(Number(a.value))}),r.appendChild(a),r.appendChild(document.createTextNode(" entries"));const l=document.createElement("span"),d=(e,t,n=!1,o=!1)=>{const s=document.createElement("button");return o?s.innerHTML=e:s.textContent=e,s.disabled=n,s.style.cssText="padding: 6px 12px; margin: 0 2px; border: 1px solid var(--dm-border, #ddd); background: var(--dm-surface, #fff); cursor: pointer; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center;",n&&(s.style.opacity="0.5"),this._addEventHandler(s,"click",t),s};l.appendChild(d(Bs.html("chevrons-left",{size:14}),()=>this.firstPage(),1===this._currentPage,!0)),l.appendChild(d(Bs.html("chevron-left",{size:14}),()=>this.prevPage(),1===this._currentPage,!0));const c=5;let h=Math.max(1,this._currentPage-Math.floor(c/2)),u=Math.min(o.totalPages,h+c-1);h=Math.max(1,u-c+1);for(let e=h;e<=u;e++){const t=d(e,()=>this.page(e),!1);e===this._currentPage&&(t.style.background="var(--dm-primary, #007bff)",t.style.color="#fff",t.style.borderColor="var(--dm-primary, #007bff)"),l.appendChild(t)}l.appendChild(d(Bs.html("chevron-right",{size:14}),()=>this.nextPage(),this._currentPage===o.totalPages,!0)),l.appendChild(d(Bs.html("chevrons-right",{size:14}),()=>this.lastPage(),this._currentPage===o.totalPages,!0)),n.appendChild(r),n.appendChild(i),n.appendChild(l),s.appendChild(n)}return this.element.appendChild(s),this._reinitRenderedContent(),e.onRender&&e.onRender(this),this}_reinitRenderedContent(){try{Bs.scan(this.element)}catch{}const e="undefined"!=typeof window&&window.Domma&&window.Domma.elements&&window.Domma.elements.tooltip;"function"==typeof e&&this.element.querySelectorAll("[data-tooltip]").forEach(t=>{try{e(t,{position:"top",trigger:"hover",delay:{show:200,hide:0}})}catch{}})}_addEventHandler(e,t,n){e.addEventListener(t,n),this._eventListeners.has(e)||this._eventListeners.set(e,[]),this._eventListeners.get(e).push({event:t,handler:n})}_clearEventListeners(){for(const[e,t]of this._eventListeners)for(const{event:n,handler:o}of t)e.removeEventListener(n,o);this._eventListeners.clear()}_restoreIconsBeforeRebuild(){this.element.querySelectorAll('svg[data-icon-processed="true"][data-original-icon]').forEach(e=>{const t=e.getAttribute("data-original-icon");if(t){const n=document.createElement("span");n.setAttribute("data-icon",t);const o=e.getAttribute("data-icon-size"),s=e.getAttribute("data-icon-color")||e.getAttribute("data-icon-colour"),i=e.getAttribute("data-icon-class");o&&n.setAttribute("data-icon-size",o),s&&n.setAttribute("data-icon-colour",s),i&&n.setAttribute("data-icon-class",i),e.replaceWith(n)}})}on(e,t){if(["sort","filter","page","select","edit","render"].includes(e)){const n="on"+e.charAt(0).toUpperCase()+e.slice(1);this.options[n]=t}return this}off(e){const t="on"+e.charAt(0).toUpperCase()+e.slice(1);return this.options[t]=null,this}refresh(){return this._applyFiltersAndSort(),this.render(),this}destroy(){this._clearEventListeners(),this.element&&(this.element.innerHTML="")}}const Ws={_instances:new Map,create(e,t={}){const n="string"==typeof e?document.querySelector(e):e,o=new Ts(n,t);return n&&this._instances.set(n,o),o},get(e){const t="string"==typeof e?document.querySelector(e):e;return this._instances.get(t)},destroy(e){const t="string"==typeof e?document.querySelector(e):e,n=this._instances.get(t);n&&(n.destroy(),this._instances.delete(t))},destroyAll(){for(const e of this._instances.values())e.destroy();this._instances.clear()}},Hs="domma-theme",Is="domma-theme-variant",Ds="dm-theme-",Os=["ocean-light","ocean-dark","forest-light","forest-dark","sunset-light","sunset-dark","royal-light","royal-dark","lemon-light","lemon-dark","silver-light","silver-dark","charcoal-light","charcoal-dark","christmas-light","christmas-dark","unicorn-light","unicorn-dark","dreamy-light","dreamy-dark","grayve-light","grayve-dark","mint-light","mint-dark","wedding-light","wedding-dark","core-light","admin-smooth-steel","admin-smooth-indigo","admin-smooth-teal","admin-sharp-steel","admin-sharp-indigo","admin-sharp-teal"],Ns="charcoal-dark";const Vs=new class{constructor(){this._theme=Ns,this._listeners=[],this._target=null,this._initialised=!1,this._systemMediaQuery=null,this._autoDetect=!1,this._disabled=!1}init(e={}){const{theme:t=null,autoDetect:n=!1,persist:o=!0,disabled:s=!1,target:i=document.body}=e;if(s)return this._disabled=!0,this._initialised=!0,this;this._target="string"==typeof i?document.querySelector(i):i,this._target||(this._target=document.body),this._persist=o,this._autoDetect=n;let r=t;if(o){const e=this._loadFromStorage();e&&!t&&(r=e)}if(n&&!r){r="dark"===this._getSystemPreference()?"charcoal-dark":"charcoal-light",this._setupSystemListener()}return r=r||Ns,Os.includes(r)||(console.warn(`Invalid theme: ${r}. Using default: ${Ns}`),r=Ns),this._theme=r,this._applyTheme(),this._initialised=!0,this}get(){return this._theme}getBase(){return this._theme.split("-").slice(0,-1).join("-")}getMode(){return this._theme.split("-").pop()}isDark(){return"dark"===this.getMode()}isLight(){return"light"===this.getMode()}set(e){if(!Os.includes(e))return console.warn(`Invalid theme: ${e}. Available themes: ${Os.join(", ")}`),this;const t=this._theme;return t===e||(this._theme=e,this._applyTheme(),this._saveToStorage(),this._notifyListeners(t,e)),this}setVariant(){return console.warn('[ThemeEngine] setVariant() is deprecated. Use set() with full theme name (e.g., set("ocean-dark"))'),this}toggle(){return console.warn("[ThemeEngine] toggle() is deprecated. Use variant selector UI or set() method."),this}onChange(e){return"function"!=typeof e?(console.warn("onChange requires a function callback"),()=>{}):(this._listeners.push(e),()=>{const t=this._listeners.indexOf(e);t>-1&&this._listeners.splice(t,1)})}preview(e){if(!Os.includes(e))return console.warn(`Invalid theme for preview: ${e}`),()=>{};const t=this._theme;return this._theme=e,this._applyTheme(!1),()=>{this._theme=t,this._applyTheme(!1)}}listThemes(){return[...Os]}listBases(){return["ocean","forest","sunset","royal","lemon","silver","charcoal","christmas","unicorn","dreamy","grayve","mint","wedding","admin-smooth","admin-sharp"]}listVariants(){return console.warn("[ThemeEngine] listVariants() is deprecated. Use listThemes() instead."),this.listBases()}getConfig(){return{theme:this._theme,base:this.getBase(),mode:this.getMode(),autoDetect:this._autoDetect,persist:this._persist,disabled:this._disabled}}_updateMetaThemeColor(){const e={light:"#ffffff",dark:"#121212"};let t=document.querySelector('meta[name="theme-color"]');t||(t=document.createElement("meta"),t.name="theme-color",document.head.appendChild(t)),t.content=e[this.getMode()]||e.dark}isDisabled(){return this._disabled}enable(){return this._disabled=!1,this._target||(this._target=document.body),this._applyTheme(),this}disable(){if(this._disabled=!0,this._target){const e=this._target.className.split(" ").filter(e=>!e.startsWith(Ds));this._target.className=e.join(" ").trim(),this._target.removeAttribute("data-mode")}return this}_applyTheme(e=!0){if(this._disabled)return;const t=this._target||document.body;if(!t)return void console.error("[ThemeEngine] No target element available for theme application");const n=t.className.split(" ").filter(e=>!e.startsWith(Ds));n.push(`${Ds}${this._theme}`),t.className=n.join(" ").trim();const o=this.isDark()?"dark":"light";t.setAttribute("data-mode",o),e&&this._updateMetaThemeColor()}_saveToStorage(){if(this._persist&&"undefined"!=typeof localStorage)try{localStorage.setItem(Hs,this._theme),localStorage.removeItem(Is)}catch(e){}}_loadFromStorage(){if("undefined"==typeof localStorage)return null;try{const e=localStorage.getItem(Hs);if(e&&Os.includes(e))return e;const t=e,n=localStorage.getItem(Is);if(t&&["light","dark"].includes(t)){const e=`${n||"charcoal"}-${t}`;if(console.log(`[ThemeEngine] Migrating theme: ${t} + ${n} → ${e}`),Os.includes(e))return localStorage.setItem(Hs,e),localStorage.removeItem(Is),e}return null}catch(e){return null}}_getSystemPreference(){return"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}_setupSystemListener(){if("undefined"==typeof window||!window.matchMedia)return;this._systemMediaQuery=window.matchMedia("(prefers-color-scheme: dark)");const e=e=>{if(!this._autoDetect)return;const t=e.matches?"dark":"light",n=`${this.getBase()}-${t}`;Os.includes(n)&&this.set(n)};this._systemMediaQuery.addEventListener?this._systemMediaQuery.addEventListener("change",e):this._systemMediaQuery.addListener(e)}_notifyListeners(e,t){this._listeners.forEach(n=>{try{n(e,t)}catch(e){console.error("[ThemeEngine] Error in change listener:",e)}})}destroy(){this._systemMediaQuery&&this._systemMediaQuery.removeEventListener,this._listeners=[],this._target=null,this._initialised=!1}};"undefined"!=typeof document&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{Vs._initialised||Vs.init({persist:!0,autoDetect:!1})}):Vs._initialised||Vs.init({persist:!0,autoDetect:!1}));const Ps={apiUrl:null,token:null,user:null,config:{},eventHandlers:{},initialized:!1,init(e={}){this.config={apiUrl:e.apiUrl||(()=>{if("undefined"==typeof window)return"http://localhost:3000/api";const{hostname:e,origin:t}=window.location;return"localhost"===e||"127.0.0.1"===e?`http://${e}:3000/api`:`${t}/api`})(),storageKey:e.storageKey||"auth_token",userStorageKey:e.userStorageKey||"auth_user",autoCheck:!1!==e.autoCheck},this.apiUrl=this.config.apiUrl,this.token=J.get(this.config.storageKey),this.user=J.get(this.config.userStorageKey),this.config.autoCheck&&this.token&&this._verifyToken().catch(()=>{this._clearToken(),this.emit("tokenExpired",null)}),this.initialized=!0},async login(e,t){if(!this.initialized)throw new Error("Auth module not initialized. Call auth.init() first.");try{const n=await d.post(`${this.apiUrl}/auth/login`,{email:e,password:t});if(!n.success||!n.token)throw new Error(n.message||"Login failed");return this.token=n.token,this.user=n.user,this._storeToken(this.token),this._storeUser(this.user),this.emit("login",this.user),this.user}catch(e){throw this.emit("error",e.message||"Login failed"),e}},async register(e,t,n){if(!this.initialized)throw new Error("Auth module not initialized. Call auth.init() first.");try{const o=await d.post(`${this.apiUrl}/auth/register`,{email:e,password:t,name:n});if(!o.success||!o.token)throw new Error(o.message||"Registration failed");return this.token=o.token,this.user=o.user,this._storeToken(this.token),this._storeUser(this.user),this.emit("register",this.user),this.user}catch(e){throw this.emit("error",e.message||"Registration failed"),e}},logout(){this.token=null,this.user=null,this._clearToken(),this._clearUser(),this.emit("logout",null)},getUser(){return this.user},isAuthenticated(){return!!this.token&&!!this.user},getHeaders(){return this.token?{Authorization:`Bearer ${this.token}`}:{}},getApiUrl(){return this.apiUrl},getRole(){return this.user?.role||null},hasRole(e){return this.user?.role===e},hasAnyRole(e){return e.includes(this.user?.role)},isAdmin(){return"admin"===this.user?.role},isSubscriber(){return"subscriber"===this.user?.role},isGuest(){return"guest"===this.user?.role},async _verifyToken(){if(!this.token)throw new Error("No token to verify");try{const e=await d.get(`${this.apiUrl}/auth/me`,{headers:this.getHeaders(),silent:!0});if(!e.success||!e.user)throw new Error("Token verification failed");return this.user=e.user,this._storeUser(this.user),this.user}catch(e){throw this._clearToken(),this._clearUser(),e}},_storeToken(e){J.set(this.config.storageKey,e)},_storeUser(e){J.set(this.config.userStorageKey,e)},_clearToken(){J.remove(this.config.storageKey),this.token=null},_clearUser(){J.remove(this.config.userStorageKey),this.user=null},on(e,t){this.eventHandlers[e]||(this.eventHandlers[e]=[]),this.eventHandlers[e].push(t)},off(e,t){this.eventHandlers[e]&&(this.eventHandlers[e]=t?this.eventHandlers[e].filter(e=>e!==t):[])},emit(e,t){this.eventHandlers[e]&&this.eventHandlers[e].forEach(n=>{try{n(t)}catch(t){console.error(`Error in auth event handler for '${e}':`,t)}})}};class Rs extends h{static defaults={emailPlaceholder:"your@email.com",passwordPlaceholder:"Enter your password",buttonText:"Login",showLabels:!0,onSubmit:null,onSuccess:null,onError:null};constructor(e,t={}){super(e,t),this._init()}_init(){if(!this.element)return;this.render();const e=this.element.querySelector("form");e&&this._addEventListener(e,"submit",async e=>{e.preventDefault(),await this.handleSubmit()})}render(){const e=this.options,t=`\n <form class="auth-login-form">\n <div class="form-group">\n ${e.showLabels?'<label class="form-label">Email</label>':""}\n <input\n type="email"\n class="form-input"\n name="email"\n placeholder="${e.emailPlaceholder}"\n required>\n </div>\n <div class="form-group">\n ${e.showLabels?'<label class="form-label">Password</label>':""}\n <input\n type="password"\n class="form-input"\n name="password"\n placeholder="${e.passwordPlaceholder}"\n required>\n </div>\n <button type="submit" class="btn btn-primary btn-block" style="margin-top: 1rem;">${e.buttonText}</button>\n </form>\n `;this.element.innerHTML=t}async handleSubmit(){const e=this.element.querySelector("form"),t=e.querySelector('[name="email"]').value,n=e.querySelector('[name="password"]').value;this.options.onSubmit&&this.options.onSubmit(t,n);try{await Ps.login(t,n),this.options.onSuccess&&this.options.onSuccess(Ps.getUser())}catch(e){this.options.onError&&this.options.onError(e)}}}class Fs extends h{static defaults={namePlaceholder:"Your name",emailPlaceholder:"your@email.com",passwordPlaceholder:"Create a password",buttonText:"Register",minPasswordLength:6,showLabels:!0,onSubmit:null,onSuccess:null,onError:null};constructor(e,t={}){super(e,t),this._init()}_init(){if(!this.element)return;this.render();const e=this.element.querySelector("form");e&&this._addEventListener(e,"submit",async e=>{e.preventDefault(),await this.handleSubmit()})}render(){const e=this.options,t=`\n <form class="auth-register-form">\n <div class="form-group">\n ${e.showLabels?'<label class="form-label">Name</label>':""}\n <input\n type="text"\n class="form-input"\n name="name"\n placeholder="${e.namePlaceholder}"\n required>\n </div>\n <div class="form-group">\n ${e.showLabels?'<label class="form-label">Email</label>':""}\n <input\n type="email"\n class="form-input"\n name="email"\n placeholder="${e.emailPlaceholder}"\n required>\n </div>\n <div class="form-group">\n ${e.showLabels?'<label class="form-label">Password</label>':""}\n <input\n type="password"\n class="form-input"\n name="password"\n placeholder="${e.passwordPlaceholder}"\n minlength="${e.minPasswordLength}"\n required>\n </div>\n <div class="form-group">\n ${e.showLabels?'<label class="form-label">Confirm Password</label>':""}\n <input\n type="password"\n class="form-input"\n name="confirmPassword"\n placeholder="Re-enter your password"\n minlength="${e.minPasswordLength}"\n required>\n </div>\n \x3c!-- Honeypot field - hidden from users, bots will fill it --\x3e\n <div class="form-group" style="position: absolute; left: -9999px; opacity: 0; pointer-events: none;" aria-hidden="true">\n <label for="website">Website</label>\n <input\n type="text"\n class="form-input"\n name="website"\n id="website"\n tabindex="-1"\n autocomplete="off">\n </div>\n <button type="submit" class="btn btn-primary btn-block" style="margin-top: 1rem;">${e.buttonText}</button>\n </form>\n `;this.element.innerHTML=t}async handleSubmit(){const e=this.element.querySelector("form"),t=e.querySelector('[name="name"]').value,n=e.querySelector('[name="email"]').value,o=e.querySelector('[name="password"]').value,s=e.querySelector('[name="confirmPassword"]').value;if(e.querySelector('[name="website"]').value)return console.warn("[Auth] Honeypot triggered - possible bot detected"),void(this.options.onError&&this.options.onError(new Error("Registration failed. Please try again.")));if(o===s){this.options.onSubmit&&this.options.onSubmit(n,o,t);try{await Ps.register(n,o,t),this.options.onSuccess&&this.options.onSuccess(Ps.getUser())}catch(e){this.options.onError&&this.options.onError(e)}}else this.options.onError&&this.options.onError(new Error("Passwords do not match. Please try again."))}}class qs extends h{static defaults={activeTab:"login",loginText:"Login",registerText:"Register",onChange:null};constructor(e,t={}){super(e,t),this._init()}_init(){if(!this.element)return;this.render();this.element.querySelectorAll("[data-tab]").forEach(e=>{this._addEventListener(e,"click",()=>{this.switchTab(e.getAttribute("data-tab"))})})}render(){const e=this.options,t=`\n <div class="btn-group btn-group-block" style="margin-bottom: 1.5rem;">\n <button class="btn ${"login"===e.activeTab?"active":""}" data-tab="login">\n ${e.loginText}\n </button>\n <button class="btn ${"register"===e.activeTab?"active":""}" data-tab="register">\n ${e.registerText}\n </button>\n </div>\n `;this.element.innerHTML=t}switchTab(e){this.options.activeTab=e;this.element.querySelectorAll("[data-tab]").forEach(t=>{t.getAttribute("data-tab")===e?t.classList.add("active"):t.classList.remove("active")}),this.options.onChange&&this.options.onChange(e)}}class Us extends h{static defaults={showIcon:!0,showRole:!0,logoutText:"Logout",onLogout:null};_init(){if(!this.element)return;this.render();const e=this.element.querySelector(".auth-logout-btn");e&&this._addEventListener(e,"click",()=>{this.handleLogout()}),Ps.on("login",()=>this.render()),Ps.on("logout",()=>this.render())}render(){const e=this.options,t=Ps.getUser();if(!t)return void(this.element.innerHTML="");this.element.innerHTML="";const n=document.createElement("div");n.className="auth-user-info";const o=document.createElement("span");if(o.className="auth-user-email",e.showIcon){const e=document.createElement("span");e.setAttribute("data-icon","user"),e.setAttribute("data-icon-size","18"),o.appendChild(e)}const s=document.createTextNode(t.email);if(o.appendChild(s),!1!==e.showRole&&t.role){const e={admin:"badge-danger",subscriber:"badge-primary",guest:"badge-secondary"}[t.role]||"badge-secondary",n=document.createElement("span");n.className=`badge ${e}`,n.textContent=t.role.charAt(0).toUpperCase()+t.role.slice(1),o.appendChild(n)}const i=document.createElement("button");i.className="auth-logout-btn",i.textContent=e.logoutText,n.appendChild(o),n.appendChild(i),this.element.appendChild(n)}handleLogout(){Ps.logout(),this.options.onLogout&&this.options.onLogout()}}Ps.LoginForm=Rs,Ps.RegisterForm=Fs,Ps.AuthTabs=qs,Ps.UserInfo=Us,Ps.createLoginForm=(e,t)=>new Rs(e,t),Ps.createRegisterForm=(e,t)=>new Fs(e,t),Ps.createAuthTabs=(e,t)=>new qs(e,t),Ps.createUserInfo=(e,t)=>new Us(e,t);const Ks={_routes:[],_views:{},_currentRoute:null,_container:null,_defaultRoute:"/",_notFoundView:null,_middleware:[],_transitioning:!1,_transitions:{},_initialised:!1,_templateCache:{},init(e={}){if(this._initialised)return console.warn("[Domma Router] Already initialised"),this;if(this._container=document.querySelector(e.container),!this._container)throw new Error(`[Domma Router] Container "${e.container}" not found`);return this._routes=e.routes||[],this._views=e.views||{},this._defaultRoute=e.default||"/",this._notFoundView=e.notFound||"404",this._transitions=e.transitions||{enter:"fadeIn",leave:"fadeOut",duration:200},window.addEventListener("hashchange",()=>this._handleRouteChange()),this._handleRouteChange(),this._initialised=!0,"undefined"!=typeof window&&window.M&&window.M.publish("router:ready",{router:this}),this},navigate(e,t={}){this._initialised?t.replace?window.location.replace(`#${e}`):window.location.hash=e:console.error("[Domma Router] Router not initialised. Call R.init() first.")},back(){window.history.back()},forward(){window.history.forward()},current(){return this._currentRoute},view(e,t){return this._views[e]=t,this},route(e){return this._routes.push(e),this},use(e){return this._middleware.push(e),this},destroy(){window.removeEventListener("hashchange",this._handleRouteChange),this._routes=[],this._views={},this._middleware=[],this._currentRoute=null,this._initialised=!1},async _handleRouteChange(){if(this._transitioning)return;const e=window.location.hash.slice(1)||this._defaultRoute,{route:t,params:n}=this._matchRoute(e);if(!t)return this._renderNotFound(e);const o=this._currentRoute,s={...t,params:n,path:e};if(await this._runMiddleware(s,o)){if(o?.onLeave){if(!1===await o.onLeave())return}if("undefined"!=typeof window&&window.M&&window.M.publish("router:beforeChange",{from:o,to:s}),t.onEnter){if(!1===await t.onEnter(n))return}t.title&&(document.title=t.title),await this._renderView(t.view,n),this._currentRoute=s,"undefined"!=typeof window&&window.M&&window.M.publish("router:afterChange",{from:o,to:s})}},_matchRoute(e){for(const t of this._routes){const n=this._extractParams(t.path,e);if(null!==n)return{route:t,params:n}}return{route:null,params:{}}},_extractParams(e,t){const n=e.split("/").filter(Boolean),o=t.split("/").filter(Boolean);if(n.length!==o.length)return null;const s={};for(let e=0;e<n.length;e++)if(n[e].startsWith(":"))s[n[e].slice(1)]=o[e];else if(n[e]!==o[e])return null;return s},async _runMiddleware(e,t){for(const n of this._middleware){let o=!1;const s=()=>{o=!0};if(await n(e,t,s),!o)return!1}return!0},async _renderView(e,t){this._transitioning=!0;const n=this._views[e];if(!n)return console.error(`[Domma Router] View "${e}" not found`),void(this._transitioning=!1);const o="undefined"!=typeof window&&window.$?window.$:null;if(!o)return console.error("[Domma Router] jQuery/Domma $ not found. Cannot animate transitions."),this._renderViewStatic(n,t),void(this._transitioning=!1);const s=o(this._container);await new Promise(e=>{s.fadeOut(this._transitions.duration,e)}),await this._renderContent(n,t,s),await new Promise(e=>{s.fadeIn(this._transitions.duration,e)}),this._transitioning=!1},async _loadTemplate(e){if(this._templateCache[e])return this._templateCache[e];try{const t=await fetch(e);if(!t.ok)throw new Error(`Failed to load template: ${e} (${t.status})`);const n=await t.text();return this._templateCache[e]=n,n}catch(e){throw console.error("[Domma Router] Template load error:",e),e}},async _renderContent(e,t,n){let o;if("object"==typeof e&&e.component&&!Array.isArray(e)){const o=e.component,s=n[0]||n,i="function"==typeof e.props?e.props(t):e.props||{},r=document.createElement(o);for(const[e,t]of Object.entries(i)){const n=e.replace(/([A-Z])/g,"-$1").toLowerCase();!0===t||""===t?r.setAttribute(n,""):!1!==t&&null!=t&&r.setAttribute(n,"object"==typeof t?JSON.stringify(t):String(t))}for(;s.firstChild;)s.removeChild(s.firstChild);return s.appendChild(r),void("function"==typeof e.onMount&&e.onMount(n))}if("object"!=typeof e||Array.isArray(e))"function"==typeof e?(o=await e(t),n.html(o,{safe:!1}),"undefined"!=typeof window&&window.I&&window.I.scan(this._container)):"string"==typeof e&&(o=this._renderTemplate(e,t),n.html(o,{safe:!1}),"undefined"!=typeof window&&window.I&&window.I.scan(this._container));else{let s=e.template;!s&&e.templateUrl&&(s=await this._loadTemplate(e.templateUrl));let i={};if(e.partials){const t=Object.entries(e.partials),n=await Promise.all(t.map(([e,t])=>this._loadTemplate(t).then(t=>[e,t])));i=Object.fromEntries(n)}"function"==typeof s?o=await s(t):"string"==typeof s&&(o=this._renderTemplate(s,t,i)),n.html(o,{safe:!1}),"undefined"!=typeof window&&window.I&&window.I.scan(this._container),e.onMount&&"function"==typeof e.onMount&&e.onMount(n)}},_renderTemplate:(e,t,n={})=>"undefined"!=typeof window&&window._&&"function"==typeof window._.render?window._.render(e,t||{},{partials:n}):e.replace(/\{\{(\w+)\}\}/g,(e,n)=>t[n]||""),async _renderViewStatic(e,t){if("object"==typeof e&&e.component&&!Array.isArray(e)){const n=e.component,o=this._container[0]||this._container,s="function"==typeof e.props?e.props(t):e.props||{},i=document.createElement(n);for(const[e,t]of Object.entries(s)){const n=e.replace(/([A-Z])/g,"-$1").toLowerCase();!0===t||""===t?i.setAttribute(n,""):!1!==t&&null!=t&&i.setAttribute(n,"object"==typeof t?JSON.stringify(t):String(t))}for(;o.firstChild;)o.removeChild(o.firstChild);return o.appendChild(i),"function"==typeof e.onMount&&e.onMount(this._container),void("undefined"!=typeof window&&window.I&&window.I.scan(o))}let n;if("object"!=typeof e||Array.isArray(e))"function"==typeof e?(n=await e(t),this._container.innerHTML=n):"string"==typeof e&&(n=this._renderTemplate(e,t),this._container.innerHTML=n);else{let o=e.template;!o&&e.templateUrl&&(o=await this._loadTemplate(e.templateUrl));let s={};if(e.partials){const t=Object.entries(e.partials),n=await Promise.all(t.map(([e,t])=>this._loadTemplate(t).then(t=>[e,t])));s=Object.fromEntries(n)}"function"==typeof o?n=await o(t):"string"==typeof o&&(n=this._renderTemplate(o,t,s)),this._container.innerHTML=n,e.onMount&&"function"==typeof e.onMount&&e.onMount(this._container)}"undefined"!=typeof window&&window.I&&window.I.scan(this._container)},async _renderNotFound(e){if(this._views[this._notFoundView])await this._renderView(this._notFoundView,{path:e});else{const t=this._container;t.textContent="";const n=document.createElement("div");n.style.cssText="text-align: center; padding: 4rem 1rem;";const o=document.createElement("h1");o.style.cssText="font-size: 4rem; margin-bottom: 1rem;",o.textContent="404";const s=document.createElement("p");s.style.cssText="font-size: 1.25rem; color: #666;",s.textContent=`Page not found: ${e}`;const i=document.createElement("a");i.href="#/",i.style.cssText="color: #3b82f6; text-decoration: underline; margin-top: 1rem; display: inline-block;",i.textContent="Go Home",n.appendChild(o),n.appendChild(s),n.appendChild(i),t.appendChild(n)}}},Ys=new Map,Js=new Map;function Gs(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function Xs(e,t={}){if(null==e)return void 0!==t.default?"function"==typeof t.default?t.default():t.default:null;const n=t.type;if(n===Ro.types?.number||"number"===n){const t=Number(e);return isNaN(t)?null:t}if(n===Ro.types?.boolean||"boolean"===n)return""===e||"true"===e||"false"!==e&&Boolean(e);if(n===Ro.types?.array||"array"===n||n===Ro.types?.object||"object"===n)try{return JSON.parse(e)}catch{return e}return e}function Zs(e,t){if(Js.has(e))return void console.warn(`[Domma Component] "${e}" is already registered.`);const{template:n,templateUrl:o,props:s={},data:i,computed:r={},methods:a={},onBeforeMount:l,onMount:d,onUpdated:h,onBeforeUnmount:u,onUnmount:m,onPropsChanged:f,style:g=""}=t,v=Object.keys(s),y=v.map(Gs);class b extends p{static get observedAttributes(){return y}constructor(){super(),this._model=null,this._props={},this._bindings=null,this._template=null,this._contentRoot=null,this._context=null,this._unsubs=[],this._computeds=new Map,this._effects=[],this._updateQueued=!1,this._teardown=!1}connectedCallback(){if(this._initialised)return this._teardown=!1,void d?.call(this._ctx());this._initialised=!0,this._initProps(),this._initModel(),this._initComputeds(),this._injectStyles(),this._contentRoot=document.createElement("div"),this._contentRoot.className="dm-component-root",this.shadowRoot.appendChild(this._contentRoot),l?.call(this._ctx()),this._renderComponent().then(()=>{this._wireBindings(),d?.call(this._ctx())})}disconnectedCallback(){this._teardown=!0,u?.call(this._ctx()),this._cleanup();for(const e of this._unsubs)e();this._unsubs=[];for(const e of this._effects)e.dispose();this._effects=[];for(const e of this._computeds.values())e.dispose();this._computeds.clear(),this._model&&this._model.destroy(),m?.call(this._ctx())}attributeChangedCallback(e,t,n){if(t===n)return;const o=e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase());if(this._props[o]=Xs(n,s[o]),f?.call(this._ctx(),o,t,n),this._initialised&&this._bindings){for(const e of this._computeds.values())e.invalidate();this._rerenderFull()}}_initProps(){for(const e of v){const t=Gs(e),n=this.hasAttribute(t)?this.getAttribute(t):null;this._props[e]=Xs(n,s[e])}}_initModel(){const e=i?i():{},t={};for(const n of Object.keys(e))t[n]={};this._model=Ro.create(t,e)}_initComputeds(){for(const[e,t]of Object.entries(r))this._computeds.set(e,de(()=>t.call(this._ctx()),{label:e}))}async _renderComponent(){let e=n;!e&&o&&(e=await async function(e){if(Ys.has(e))return Ys.get(e);const t=await fetch(e);if(!t.ok)throw new Error(`[Domma Component] Failed to load template: ${e} (${t.status})`);const n=await t.text();return Ys.set(e,n),n}(o)),e?(this._template=e,this._bindings=Lo.compile(e,this._mergeData(),this._contentRoot,(e,t)=>c.render(e,t))):this._contentRoot.textContent=""}_rerenderFull(){this._bindings&&(this._bindings.rerenderAll(this._mergeData()),h?.call(this._ctx()))}_wireBindings(){if(this._bindings){for(const e of this._bindings.bindings){const t=[...e.deps].filter(e=>this._computeds.has(e)||!Object.prototype.hasOwnProperty.call(this._props,e));if(0===t.length)continue;let n=!1;const o=ce(()=>{for(const e of t)this._readBound(e);n?he(()=>{this._bindings.update(e.id,this._mergeData()),this._scheduleUpdate()}):n=!0},{label:`${this.tagName.toLowerCase()}:${e.id}`});this._effects.push(o)}this._wireUpdateWatcher()}}_wireUpdateWatcher(){if(!h||!this._model)return;let e=!1;const t=ce(()=>{this._model.get(),e?he(()=>this._scheduleUpdate()):e=!0},{label:`${this.tagName.toLowerCase()}:updated`});this._effects.push(t)}_readBound(e){return this._computeds.has(e)?this._computeds.get(e).get():Object.prototype.hasOwnProperty.call(this._props,e)?this._props[e]:this._model?this._model.get(e):void 0}_scheduleUpdate(){this._updateQueued||(this._updateQueued=!0,Promise.resolve().then(()=>{this._updateQueued=!1,!this._teardown&&this._initialised&&this._bindings&&h?.call(this._ctx())}))}_getStyles(){return"\n :host {\n --dm-primary: var(--dm-primary, #6495ED);\n --dm-secondary: var(--dm-secondary, #6c757d);\n --dm-success: var(--dm-success, #28a745);\n --dm-danger: var(--dm-danger, #dc3545);\n --dm-warning: var(--dm-warning, #ffc107);\n --dm-info: var(--dm-info, #17a2b8);\n --dm-white: var(--dm-white, #ffffff);\n --dm-gray-100: var(--dm-gray-100, #f8f9fa);\n --dm-gray-200: var(--dm-gray-200, #e9ecef);\n --dm-gray-300: var(--dm-gray-300, #dee2e6);\n --dm-gray-400: var(--dm-gray-400, #ced4da);\n --dm-gray-500: var(--dm-gray-500, #adb5bd);\n --dm-gray-600: var(--dm-gray-600, #6c757d);\n --dm-gray-700: var(--dm-gray-700, #495057);\n --dm-gray-800: var(--dm-gray-800, #343a40);\n --dm-gray-900: var(--dm-gray-900, #212529);\n --dm-radius-sm: var(--dm-radius-sm, 0.25rem);\n --dm-radius-md: var(--dm-radius-md, 0.375rem);\n --dm-radius-lg: var(--dm-radius-lg, 0.5rem);\n --dm-radius-full: var(--dm-radius-full, 9999px);\n --dm-transition-fast: var(--dm-transition-fast, 150ms);\n --dm-transition-normal: var(--dm-transition-normal, 300ms);\n --dm-transition-slow: var(--dm-transition-slow, 500ms);\n --dm-shadow-sm: var(--dm-shadow-sm, 0 1px 2px 0 rgba(0, 0, 0, 0.05));\n --dm-shadow-md: var(--dm-shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1));\n --dm-shadow-lg: var(--dm-shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));\n --dm-shadow-xl: var(--dm-shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, 0.1));\n }\n "+(g||"")}_ctx(){if(this._context)return this._context;const e=this,t={get data(){return e._model?e._model.tracked():{}},get props(){return{...e._props}},get root(){return e.shadowRoot},get el(){return e},set(t){e._model&&e._model.set(t)}};for(const[n,o]of Object.entries(r))Object.defineProperty(t,n,{get(){const t=e._computeds.get(n);return t?t.get():o.call(e._ctx())},enumerable:!0,configurable:!0});for(const[e,n]of Object.entries(a))t[e]=n.bind(t);return this._context=t,t}_mergeData(){const e=this._model?this._model.toJSON():{},t={};for(const[e,n]of this._computeds.entries())t[e]=n.get();const n={},o=this._ctx();for(const e of Object.keys(a))n[e]=o[e];const s={...n,...e,...this._props,...t},i=this._model;return G(s,{onWrite:i?(e,t)=>i.set({[e]:t}):void 0})}}const k=e.includes("-")?e:`domma-${e}`;return customElements.define(k,b),Js.set(e,t),b}const Qs={define:(e,t)=>Zs(e,t),has:e=>Js.has(e),registry:()=>new Map(Js),get templateCache(){return Ys}},ei={"domma-badge":f,"domma-tooltip":v,"domma-loader":y,"domma-back-to-top":b,"domma-toast":k,"domma-modal":_,"domma-card":w};function ti(){for(const[e,t]of Object.entries(ei))customElements.get(e)||customElements.define(e,t)}ti(),ti();let ni=!0;"undefined"!=typeof document&&document.body?document.body.classList.add("dm-cloaked"):"undefined"!=typeof document&&document.addEventListener("DOMContentLoaded",()=>{ni&&document.body.classList.add("dm-cloaked")});const oi=(e,t)=>l(e,t);oi.version="0.40.0",oi.buildInfo={version:"0.40.0",built:"21/08/2026 16:29",commit:"c788672"},oi.http=d,oi.utils=c,oi.setup=e=>(!1===e.cloak&&(ni=!1,"undefined"!=typeof document&&document.body&&(document.body.classList.remove("dm-cloaked"),document.body.classList.add("dm-ready"))),e.noStyles?Vs.init({disabled:!0}):(e.theme||e.autoDetectTheme)&&Vs.init({theme:e.theme,autoDetect:e.autoDetectTheme,persist:!1!==e.persistTheme}),e.scanIcons&&Bs.scan(),es.process(e)),oi.update=(e,t)=>es.update(e,t),oi.config=e=>es.config(e),oi.getComponent=e=>es.getComponent(e),oi.reset=e=>es.reset(e),oi.ready=e=>es.ready(e),oi.models=Ro,oi.elements=Y,oi.effects=Qo,oi.dates=hs,oi.tables=Ws,oi.forms=qo,oi.theme=Vs,oi.icons=Bs,oi.storage=J,oi.auth=Ps,oi.router=Ks,oi.sanitize=r,oi.components=Qs,oi.component=(e,t)=>Zs(e,t),oi.DesktopNotification=j;const si=oi,ii=c,ri=Ro,ai=hs,li=J,di=Ps,ci=qo,hi=d,ui=Y,pi=Bs,mi=Ws,fi=Ks,gi={extend:Ro.extend.bind(Ro),pick:Ro.pick.bind(Ro),omit:Ro.omit.bind(Ro)};if(oi.M=ri,oi.D=ai,oi.S=li,oi.A=di,oi.F=ci,oi.H=hi,oi.E=ui,oi.I=pi,oi.T=mi,oi.R=fi,oi.B=gi,"undefined"!=typeof window&&(window.Domma=oi,window.$=si,window._=ii,window.M=ri,window.D=ai,window.S=li,window.A=di,window.F=ci,window.H=hi,window.E=ui,window.I=pi,window.T=mi,window.R=fi,window.B=gi),"undefined"!=typeof document){const e=()=>{ni&&document.body.classList.contains("dm-cloaked")&&document.body.classList.add("dm-ready")};"complete"===document.readyState?setTimeout(e,0):window.addEventListener("load",e)}e.$=si,e.A=di,e.B=gi,e.D=ai,e.Domma=oi,e.E=ui,e.F=ci,e.H=hi,e.I=pi,e.M=ri,e.R=fi,e.S=li,e.T=mi,e._=ii,e.components=Qs,e.default=oi,Object.defineProperty(e,"__esModule",{value:!0})});
9
+ /*! domma-reactive v1.0.0 | MIT | https://github.com/pinpointzero73/domma-reactive */function X(e,t){return Q(e,t,null)}function Z(e){return e===Object.prototype||null===e}function Q(e,t,n){if(Object.is(e,t))return!0;if(0===e&&0===t)return!0;if(null===e||null===t)return!1;if("object"!=typeof e||"object"!=typeof t)return!1;if(e instanceof Date||t instanceof Date)return e instanceof Date&&t instanceof Date&&Object.is(e.getTime(),t.getTime());const o=Array.isArray(e);if(o!==Array.isArray(t))return!1;if(!(o||Z(Object.getPrototypeOf(e))&&Z(Object.getPrototypeOf(t))))return!1;const s=n||new WeakMap,i=s.get(e);if(i){if(i.has(t))return!0;i.add(t)}else s.set(e,new Set([t]));if(o){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Q(e[n],t[n],s))return!1;return!0}const r=Object.keys(e),a=Object.keys(t);if(r.length!==a.length)return!1;for(const n of r){if(!Object.prototype.hasOwnProperty.call(t,n))return!1;if(!Q(e[n],t[n],s))return!1}return!0}let ee=null;const te=[],ne=new Set;let oe=!1,se=!1;class ie{constructor(e=null){this.subs=new Set,this.owner=e}track(){ee&&ee!==this.owner&&(this.subs.add(ee),ee.deps.add(this))}trigger(){if(0!==this.subs.size){for(const e of this.subs)e.invalidate(),ne.add(e);ae()}}}class re{constructor(e,t={}){this.fn=e,this.label=t.label||(t.effect?"effect":"computed"),this.isEffect=!0===t.effect,this.onNotify=t.onNotify||null,this._write="function"==typeof t.write?t.write:null,this.deps=new Set,this.dep=new ie(this),this._value=void 0,this.dirty=!0,this.disposed=!1}_run(){for(const e of this.deps)e.subs.delete(this);this.deps.clear(),te.push(ee),ee=this;try{return this.fn()}catch(e){return void console.warn(`[Domma Reactive] "${this.label}" threw during evaluation:`,e)}finally{ee=te.pop()}}get(){return this.dirty&&!this.disposed&&(this._value=this._run(),this.dirty=!1),this.dep.track(),this._value}get value(){return this.get()}set value(e){this.write(e)}write(e){this._write?he(()=>this._write(e)):console.warn(`[Domma Reactive] "${this.label}" is a read-only computed - the assignment was ignored. Pass computed({read, write}) to say where a write should land.`)}set(e){this.write(e)}recompute(){if(this.disposed)return{changed:!1,value:this._value};const e=this._value;return this._value=this._run(),this.dirty=!1,{changed:!X(e,this._value),value:this._value}}invalidate(){this.dirty=!0}dependents(){return this.dep.subs}notify(){!this.disposed&&this.onNotify&&this.onNotify(this._value,this)}dispose(){if(!this.disposed){for(const e of this.deps)e.subs.delete(this);this.deps.clear(),this.dep.subs.clear(),ne.delete(this),this.disposed=!0}}}function ae(){oe||se||(oe=!0,Promise.resolve().then(le))}function le(){if(oe=!1,!se&&0!==ne.size){se=!0;try{const e=new Set(ne);ne.clear(),function(e){const t=20,n=new Map,o=new Set,s=[...e];for(;s.length>0;){const e=s.shift();if(e.disposed)continue;const i=(n.get(e)||0)+1;if(n.set(e,i),i>t){console.warn(`[Domma Reactive] "${e.label}" re-entered the flush ${t} times - likely a dependency cycle. Skipping.`);continue}if(e.isEffect){o.add(e);continue}if(0===e.dependents().size&&!e.onNotify)continue;const{changed:r}=e.recompute();if(r)for(const t of e.dependents())t.invalidate(),s.push(t)}for(const e of o)e.disposed||e.recompute()}(e)}finally{se=!1,ne.size>0&&ae()}}}function de(e,t={}){if(null!==e&&"object"==typeof e){const{read:n,...o}=e;if("function"!=typeof n)throw new TypeError("[Domma Reactive] computed({read, write}): `read` must be a function");return new re(n,{...o,...t,effect:!1})}return new re(e,{...t,effect:!1})}function ce(e,t={}){const n=new re(e,{...t,effect:!0,onNotify:null});return n.recompute(),n}function he(e){te.push(ee),ee=null;try{return e()}finally{ee=te.pop()}}const ue="[Domma Reactive]",pe=new Map,me=new Set(["notify","rateLimit","throttle"]);function fe(e,t){if("string"!=typeof e||0===e.length)throw new TypeError(`${ue} registerExtender: the name must be a non-empty string`);if("function"!=typeof t)throw new TypeError(`${ue} registerExtender: "${e}" was not given a function`);return pe.has(e)&&!me.has(e)&&console.warn(`${ue} registerExtender: "${e}" replaces an existing extender`),pe.set(e,t),t}fe("notify",(e,t)=>{"always"===t?e.setEquals(()=>!1):console.warn(`${ue} extend: notify accepts only 'always' - got ${JSON.stringify(t)}`)});const ge=new WeakMap;fe("rateLimit",(e,t)=>{const n=function(e){const t=e&&"object"==typeof e?e:{timeout:e},n=t.timeout;if("number"!=typeof n||!Number.isFinite(n)||n<0)return console.warn(`${ue} extend: rateLimit needs a timeout in milliseconds - got ${JSON.stringify(n)}`),null;const o=t.method||"notifyWhenChangesStop";return"notifyWhenChangesStop"!==o&&"notifyAtFixedRate"!==o?(console.warn(`${ue} extend: rateLimit method must be 'notifyWhenChangesStop' or 'notifyAtFixedRate' - got ${JSON.stringify(o)}`),null):{timeout:n,fixed:"notifyAtFixedRate"===o}}(t);if(!n)return;let o=ge.get(e.observable);o||(o={timeout:n.timeout,fixed:n.fixed,timer:null,latest:void 0,armed:!1},ge.set(e.observable,o),e.intercept(e=>t=>function(e,t,n){e.timeout<=0?t(n):(e.latest=n,e.fixed&&e.armed||(e.armed=!0,e.timer&&clearTimeout(e.timer),e.timer=setTimeout(()=>{e.timer=null,e.armed=!1,t(e.latest)},e.timeout)))}(o,e,t))),o.timeout=n.timeout,o.fixed=n.fixed,0===n.timeout&&o.timer&&(clearTimeout(o.timer),o.timer=null,o.armed=!1)}),fe("throttle",(e,t)=>{pe.get("rateLimit")(e,t)});const ve="[Domma Reactive]";function ye(){const e=new Set;return{add(t){if("function"!=typeof t)throw new TypeError(`${ve} subscribe: expected a function`);e.add(t);const n=()=>{e.delete(t)};return n.dispose=n,n},notify(t){if(0!==e.size)for(const n of[...e])try{n(t)}catch(e){console.warn(`${ve} a subscriber threw:`,e)}},size:()=>e.size}}function be(e,t){let n=e.equals||X,o=t;const s={observable:null,setEquals(e){if("function"!=typeof e)throw new TypeError(`${ve} extend: setEquals expects a function`);n=e},intercept(e){if("function"!=typeof e)throw new TypeError(`${ve} extend: intercept expects a function`);o=e(o)}};return{changed:(e,t)=>!n(e,t),announce:e=>o(e),attach:e=>{s.observable=e},extend:e=>function(e,t){if(t&&"object"==typeof t)for(const[n,o]of Object.entries(t)){const t=pe.get(n);t?t(e,o):console.warn(`${ue} extend: no extender named "${n}". Registered: ${[...pe.keys()].join(", ")}.`)}else console.warn(`${ue} extend: expected an object of extenders`)}(s,e)}}function ke(e,t={}){const n=new ie,o=ye();let s=e;const i=be(t,e=>{n.trigger(),o.notify(e)}),r=e=>{const t=i.changed(s,e);s=e,t&&i.announce(s)},a={get value(){return n.track(),s},set value(e){r(e)},peek:()=>s,set:e=>r(e),subscribe:e=>o.add(e),extend:e=>(i.extend(e),a)};return i.attach(a),a}const _e=["push","pop","shift","unshift","splice","sort","reverse","fill","copyWithin"];const we=new Set(["$data","$root","$parent","$index","$length","$parents","$parentContext","$component"]),Me=Object.freeze([]);function xe(e){let t=null;return Object.defineProperty(e,"$parents",{enumerable:!0,get:()=>t??=function(e){const t=[];for(let n=e.$parentContext;null!==n;n=n.$parentContext)t.push(n.$data);return Object.freeze(t)}(e)}),Object.freeze(e)}function Le(e,t,n=null,o=null){const s=Ee(e);return xe({$data:t,$root:s.$root,$parent:s.$data,$index:void 0===n?null:n,$length:void 0===o?null:o,$parentContext:s,$component:s.$component??null})}function Ce(e,t){const n=Ee(e);return xe({$data:t,$root:n.$root,$parent:n.$data,$index:null,$length:null,$parentContext:n,$component:t})}function Ee(e){return function(e){return null!==e&&"object"==typeof e&&"$data"in e}(e)?e:(t=e,Object.freeze({$data:t,$root:t,$parent:null,$index:null,$length:null,$parents:Me,$parentContext:null,$component:null}));var t}const Se="[Domma Reactive]",Ae=64,$e=new Set(["__proto__","constructor","prototype"]),ze=new Map([["new","the `new` operator is not supported"],["delete","`delete` is not supported"],["typeof","`typeof` is not supported"],["void","`void` is not supported"],["instanceof","`instanceof` is not supported"],["in","the `in` operator is not supported"],["function","function expressions are not supported"],["class","class expressions are not supported"],["this","`this` is not supported - use $data"],["await","`await` is not supported"],["yield","`yield` is not supported"]]);class je extends Error{}const Be=new Map,Te=new Map,We=new Map,He=new WeakMap,Ie=new Set,De=/[0-9]/,Oe=/[\p{ID_Start}$_]/u,Ne=/[\p{ID_Continue}$\u200C\u200D]/u,Ve=["===","!==","&&","||","<=",">=","??","==","!=","<",">","+","-","*","/","%","!","?",":",".",",","(",")","[","]","="],Pe=new Map([["==","loose equality is not supported - use ==="],["!=","loose inequality is not supported - use !=="],["=","assignment is not supported"],["??","the ?? operator is not supported"]]),Re={n:"\n",t:"\t",r:"\r",b:"\b",f:"\f",v:"\v",0:"\0"};function Fe(e,t){const n=e[t];let o="",s=t+1;for(;s<e.length;){const t=e[s];if("\\"===t){const t=e[s+1];if(void 0===t)break;if("u"===t){const t=e.slice(s+2,s+6);if(!/^[0-9a-fA-F]{4}$/.test(t))throw new je(`bad \\u escape at position ${s}`);o+=String.fromCharCode(parseInt(t,16)),s+=6;continue}o+=Object.prototype.hasOwnProperty.call(Re,t)?Re[t]:t,s+=2;continue}if(t===n)return{value:o,end:s+1};o+=t,s++}throw new je(`unterminated string starting at position ${t}`)}const qe={"||":{bp:3,logical:!0},"&&":{bp:4,logical:!0},"===":{bp:5},"!==":{bp:5},"<":{bp:6},"<=":{bp:6},">":{bp:6},">=":{bp:6},"+":{bp:7},"-":{bp:7},"*":{bp:8},"/":{bp:8},"%":{bp:8}},Ue=new Set(["-","+","!"]),Ke=e=>Object.freeze(e);function Ye(e,t=!1){const n=function(e){const t=[];let n=0;for(;n<e.length;){const o=e[n];if(/\s/.test(o)){n++;continue}if(De.test(o)){const o=n;for(;n<e.length&&De.test(e[n]);)n++;if("."===e[n])for(n++;n<e.length&&De.test(e[n]);)n++;if("e"===e[n]||"E"===e[n]){const t=n;if(n++,"+"!==e[n]&&"-"!==e[n]||n++,De.test(e[n]??""))for(;n<e.length&&De.test(e[n]);)n++;else n=t}t.push({type:"num",value:Number(e.slice(o,n)),pos:o});continue}if('"'===o||"'"===o){const o=Fe(e,n);t.push({type:"str",value:o.value,pos:n}),n=o.end;continue}if("`"===o)throw new je(`template literals are not supported at position ${n}`);if(Oe.test(o)){const o=n;for(n++;n<e.length&&Ne.test(e[n]);)n++;const s=e.slice(o,n);"true"===s?t.push({type:"num",value:!0,pos:o}):"false"===s?t.push({type:"num",value:!1,pos:o}):"null"===s?t.push({type:"num",value:null,pos:o}):t.push({type:"ident",value:s,pos:o});continue}const s=Ve.find(t=>e.startsWith(t,n));if(s){const e=Pe.get(s);if(e)throw new je(`${e} (at position ${n})`);t.push({type:"punct",value:s,pos:n}),n+=s.length;continue}throw new je(`unexpected character "${o}" at position ${n}`)}return t.push({type:"eof",value:null,pos:e.length}),t}(e);let o=0,s=0;const i=()=>n[o],r=e=>"punct"===n[o].type&&n[o].value===e,a=(e,t=n[o])=>{throw new je(`${e} at position ${t.pos}`)},l=e=>!!r(e)&&(o++,!0),d=e=>{l(e)||a(`expected "${e}" but found ${Je(i())}`)};function c(e){if(++s>Ae)throw new je("expression nests deeper than 64 levels");try{let t=function(){const e=i();if("num"===e.type||"str"===e.type)return o++,Ke({type:"Literal",value:e.value});if("ident"===e.type){const t=ze.get(e.value);return t&&a(t),o++,Ke({type:"Identifier",name:e.value})}if("punct"===e.type){if(Ue.has(e.value))return o++,Ke({type:"Unary",operator:e.value,argument:c(9)});if("("===e.value){o++;const e=c(0);return d(")"),e}"["===e.value&&a("array literals are not supported")}return a(`unexpected ${Je(e)}`)}();for(;;){const n=i();if("punct"!==n.type)break;if(10>e&&("."===n.value||"["===n.value||"("===n.value)){t=h(t);continue}if("?"===n.value&&2>e){o++;const e=c(0);d(":");const n=c(1);t=Ke({type:"Conditional",test:t,consequent:e,alternate:n});continue}const s=Object.prototype.hasOwnProperty.call(qe,n.value)?qe[n.value]:void 0;if(!s||s.bp<=e)break;o++;const r=c(s.bp);t=Ke({type:s.logical?"Logical":"Binary",operator:n.value,left:t,right:r})}return t}finally{s--}}function h(e){if(l(".")){const t=i();return"ident"!==t.type&&a(`expected a property name after "." but found ${Je(t)}`),o++,Ke({type:"Member",object:e,property:t.value,computed:!1})}if(l("[")){const t=c(0);return d("]"),Ke({type:"Member",object:e,property:t,computed:!0})}d("(");const n=t&&"Member"===e.type;"Identifier"===e.type||n||a("only registered helpers can be called - `x.foo()` is not supported");const s=[];if(!r(")"))do{s.push(c(0))}while(l(","));return d(")"),Ke(n?{type:"MethodCall",object:e.object,property:e.property,computed:e.computed,args:Object.freeze(s)}:{type:"Call",callee:e.name,args:Object.freeze(s)})}if(1===n.length)throw new je("the expression is empty");const u=c(0);"eof"!==i().type&&a(`unexpected ${Je(i())}`);const p=function(e){let t=0;const n=[[e,1]];for(;n.length>0;){const[e,o]=n.pop();if(o>t&&(t=o),t>Ae)return t;for(const t of Ge(e))n.push([t,o+1])}return t}(u);if(p>Ae)throw new je(`expression nests deeper than 64 levels (${p})`);return u}function Je(e){return"eof"===e.type?"end of expression":"str"===e.type?`string ${JSON.stringify(e.value)}`:"num"===e.type?`literal ${String(e.value)}`:`"${e.value}"`}function Ge(e){switch(e?.type){case"Member":return e.computed?[e.object,e.property]:[e.object];case"Unary":return[e.argument];case"Binary":case"Logical":return[e.left,e.right];case"Conditional":return[e.test,e.consequent,e.alternate];case"Call":return e.args;case"MethodCall":return e.computed?[e.object,e.property,...e.args]:[e.object,...e.args];default:return[]}}function Xe(e,t){if(null==e)return;const n=String(t);if(!$e.has(n))return e[n];console.warn(`${Se} blocked an expression from reading "${n}" - __proto__, constructor and prototype are not readable from an expression`)}function Ze(e,t,n){if(n>Ae)throw new je("evaluation nests deeper than 64 levels");switch(e.type){case"Literal":return e.value;case"Identifier":return function(e,t){return we.has(e)?t[e]:Xe(t.$data,e)}(e.name,t);case"Member":return Xe(Ze(e.object,t,n+1),e.computed?Ze(e.property,t,n+1):e.property);case"Unary":{const o=Ze(e.argument,t,n+1);switch(e.operator){case"!":return!o;case"-":return-o;default:return+o}}case"Logical":{const o=Ze(e.left,t,n+1);return"&&"===e.operator?o?Ze(e.right,t,n+1):o:o||Ze(e.right,t,n+1)}case"Binary":{const o=Ze(e.left,t,n+1),s=Ze(e.right,t,n+1);switch(e.operator){case"+":return o+s;case"-":return o-s;case"*":return o*s;case"/":return o/s;case"%":return o%s;case"===":return o===s;case"!==":return o!==s;case"<":return o<s;case"<=":return o<=s;case">":return o>s;default:return o>=s}}case"Conditional":return Ze(e.test,t,n+1)?Ze(e.consequent,t,n+1):Ze(e.alternate,t,n+1);case"Call":return function(e,t){const n=Be.get(e);if("function"==typeof n)return n(...t);Ie.has(e)||(Ie.add(e),console.warn(`${Se} no helper named "${e}" is registered - expressions can only call helpers registered with registerHelper()`))}(e.callee,e.args.map(e=>Ze(e,t,n+1)));case"MethodCall":throw new je("an expression cannot call a method - `x.foo()` is available to data-on-* handlers only, because a call during a render is a side effect");default:throw new je(`unknown node type "${e.type}"`)}}function Qe(e,t={}){const n="string"==typeof e?e:String(e??""),o=!0===t.methodCalls,s=o?We:Te;if(s.has(n))return s.get(n);let i=null;try{i=Ye(n,o),He.set(i,n)}catch(e){const o=t.template?` in template "${t.template}"`:"";console.warn(`${Se} could not parse expression "${n}"${o}: ${e.message}. The binding is skipped.`),i=null}return s.size>=1e3&&s.clear(),s.set(n,i),i}function et(e,t){if(null!==e&&"object"==typeof e&&"string"==typeof e.type)try{return Ze(e,Ee(t),0)}catch(t){const n=He.get(e);return void console.warn(`${Se} expression ${void 0===n?"(not from parseExpression) ":`"${n}" `}threw during evaluation:`,t)}}function tt(e,t={}){const n=Qe(e,t);return null===n?null:e=>et(n,e)}function nt(e,t={}){const n="string"==typeof e?Qe(e,t):e,o=new Set;if(null===n||"object"!=typeof n)return o;const s=[n];for(;s.length>0;){const e=s.pop();if(null!==e&&"object"==typeof e)if("Identifier"!==e.type)if("Member"!==e.type||e.computed||"Identifier"!==e.object?.type||"$data"!==e.object.name&&"$root"!==e.object.name)for(const t of Ge(e))s.push(t);else o.add(e.property);else we.has(e.name)||o.add(e.name)}return o}function ot(e,t){if("string"!=typeof e||!function(e){if(0===e.length||!Oe.test(e[0]))return!1;for(const t of e.slice(1))if(!Ne.test(t))return!1;return!ze.has(e)}(e))throw new TypeError(`${Se} registerHelper: "${String(e)}" is not a valid helper name (it must be a plain identifier, so that an expression can spell it)`);if("function"!=typeof t)throw new TypeError(`${Se} registerHelper: "${e}" was given a ${typeof t}, not a function`);return Be.set(e,t),Ie.delete(e),t}const st=/\{\{#(if|unless|each|with)\s+([^}]+?)\s*\}\}/,it=/\{\{([#/])(if|unless|each|with)(?:\s+[^}]*?)?\s*\}\}|\{\{else\}\}/g,rt=/\{\{\{\s*([^{}]+?)\s*\}\}\}/g,at=/\{\{>\s*([^{}]+?)\s*\}\}/g,lt=/\{\{!\s*[^{}]*?\s*\}\}/g,dt=/\{\{(?!\{)\s*([^#/>!{}][^{}]*?)\s*\}\}/g,ct=/^[A-Za-z_$][\w$]*(?:\.[\w$]+)*$/,ht=/[?:()[\]'"!<>=*/%]|&&|\|\||\s[-+]\s/,ut={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},pt=e=>null==e?"":String(e);function mt(e){return Array.isArray(e)?e.length>0:Boolean(e)}function ft(e){if(!Array.isArray(e))return[];for(let t=0;t<e.length;t++){const n=e[t];if(null!==n&&"object"==typeof n&&!0===n._destroy)return e.filter(e=>!(null!==e&&"object"==typeof e&&!0===e._destroy))}return e}function gt(e,t,n){const o=e.trim();return"."===o?null!==t&&"object"==typeof t&&"."in t?t["."]:t:o.startsWith("@")?t?.[o]:ct.test(o)||!ht.test(o)?function(e,t){let n=e;for(const e of t.split(".")){if(null==n)return;n=n[e]}return n}(t,o):function(e,t,n={}){return et(Qe(e,n),t)}(o,t,n)}function vt(e,t,n){return e.replace(lt,"").replace(at,(e,o)=>{const s=n.partials?.[o.trim()];return void 0===s?"":yt(s,t,n)}).replace(rt,(e,o)=>pt(gt(o,t,n))).replace(dt,(e,o)=>pt(gt(o,t,n)).replace(/[&<>"']/g,e=>ut[e]))}function yt(e,t={},n={}){if("string"!=typeof e||0===e.length)return"";const o=e.match(st);if(!o)return vt(e,t,n);const[s,i,r]=o,a=o.index+s.length,{close:l,alternate:d}=function(e,t,n){let o=0,s=-1;for(const i of e.slice(n).matchAll(it)){const e=n+i.index;if(void 0!==i[1])if("#"!==i[1]){if(0!==o)o--;else if(i[2]===t)return{close:e,alternate:s}}else o++;else 0===o&&-1===s&&(s=e)}return{close:-1,alternate:-1}}(e,i,a);if(-1===l)return vt(e,t,n);const c="if"===i&&-1!==d&&d<l,h=e.slice(a,c?d:l),u=c?e.slice(d+8,l):"",p=vt(e.slice(0,o.index),t,n),m=yt(e.slice(l+`{{/${i}}}`.length),t,n),f=gt(r,t,n);let g="";if("if"===i)g=mt(f)?yt(h,t,n):yt(u,t,n);else if("unless"===i)g=mt(f)?"":yt(h,t,n);else if("each"===i){const e=ft(f);g=e.map((t,o)=>yt(h,function(e,t,n){const o={"@index":t,"@first":0===t,"@last":t===n-1};return null!==e&&"object"==typeof e?{...e,...o}:{".":e,...o}}(t,o,e.length),n)).join("")}else g=null!==f&&"object"==typeof f?yt(h,f,n):"";return p+g+m}const bt="[Domma Reactive]",kt=new Map,_t=new Set;function wt(e,t){_t.has(e)||(_t.add(e),console.warn(`${bt} ${t}`))}function Mt(e,t){if("string"!=typeof e||0===e.length)throw new TypeError(`${bt} registerBinding: the name must be a non-empty string`);if(null===t||"object"!=typeof t)throw new TypeError(`${bt} registerBinding: "${e}" was not given a handler object`);if("function"!=typeof t.update)throw new TypeError(`${bt} registerBinding: "${e}" has no update() function`);for(const n of["attach","detach"])if(void 0!==t[n]&&"function"!=typeof t[n])throw new TypeError(`${bt} registerBinding: "${e}".${n} is not a function`);return kt.has(e)&&console.warn(`${bt} registerBinding: "${e}" replaces an existing binding handler`),kt.set(e,Object.freeze({...t})),t}function xt(e){return kt.get(e)}function Lt(e){let t=null;for(const[n,o]of kt){if(o.attribute===e)return{kind:n,handler:o,arg:null};"string"==typeof o.attributePrefix&&e.startsWith(o.attributePrefix)&&e.length>o.attributePrefix.length&&(null===t||o.attributePrefix.length>t.handler.attributePrefix.length)&&(t={kind:n,handler:o,arg:e.slice(o.attributePrefix.length)})}return t}const Ct=e=>null==e?"":String(e);function Et(e,t){if(null===e||"object"!=typeof e)return null;if("Identifier"===e.type){if(we.has(e.name))return null;const n=t.$data;return null===n||"object"!=typeof n||(Object.isFrozen(n)||$e.has(e.name))?null:{object:n,key:e.name}}if("Member"===e.type){const n=et(e.object,t);if(null===n||"object"!=typeof n)return null;if(Object.isFrozen(n))return null;const o=Ct(e.computed?et(e.property,t):e.property);return $e.has(o)?null:{object:n,key:o}}return null}const St={tracks:!0,update({binding:e,nodes:t,context:n}){const o=Ct(e.evaluate(n));for(const e of t)e.textContent=o;return!0}},At={tracks:!0,update({binding:e,nodes:t,context:n,render:o}){for(const s of t)for(const t of e.parts){const e=o(t.tmpl,n.$data);s.setAttribute(t.name,e),"value"===t.name&&"value"in s&&(s.value=e)}return!0}},$t={tracks:!0,capturesBody:!0,update({binding:e,nodes:t,context:n,render:o,replaceRegion:s,reindex:i}){const r=o(e.body,n.$data);for(const e of t)s(e.open,e.close,r);return i(),!0}},zt={tracks:!0,region:!0,capturesBody:!0,primes:!0,attribute:"data-if",expression:!0,update({binding:e,nodes:t,context:n,render:o,replaceRegion:s,reindex:i}){const r=mt(e.evaluate(n))?o(e.body,n.$data):"";for(const e of t)s(e.open,e.close,r);return i(),!0}},jt=new WeakMap,Bt={attributePrefix:"data-on-",expression:!0,methodCalls:!0,tracks:!1,update:()=>!1,attach({binding:e,node:t,controller:n}){if(!e.arg)return;const o=t=>function(e,t,n){const o=e.ast;if(null===o)return;let s,i,r=n.$data;if("MethodCall"===o.type){r=et(o.object,n);s=Xe(r,o.computed?et(o.property,n):o.property),i=o.args.map(e=>et(e,n))}else"Call"===o.type?(s=et({type:"Identifier",name:o.callee},n),i=o.args.map(e=>et(e,n))):(s=et(o,n),i=[]);if("function"!=typeof s)return void wt(`event:${e.id}:${e.expr}`,`data-on-${e.arg}="${e.expr}" did not resolve to a function - an event binding names a handler on your data, or calls one`);!1===s.call(r,...i,t)&&t.preventDefault()}(e,t,n.context());t.addEventListener(e.arg,o);let s=jt.get(t);s||jt.set(t,s=new Map),s.set(e.id,{type:e.arg,listener:o})},detach({binding:e,node:t}){const n=jt.get(t)?.get(e.id);n&&(t.removeEventListener(n.type,n.listener),jt.get(t).delete(e.id))}};const Tt=new Set(["value","checked","selected","disabled","readonly","required","multiple","indeterminate","open","hidden"]),Wt=new WeakMap,Ht=new WeakMap,It={attributePrefix:"data-bind-",expression:!0,tracks:!0,primes:!0,update({binding:e,nodes:t,context:n}){const o=e.arg;if("html"===o)return wt("bind:html","data-bind-html is not supported - assigning innerHTML from data is an XSS hole. Use {{{triple-stache}}}, which says so where an author can see it."),!1;const s=e.evaluate(n);for(const n of t)"text"===o?n.textContent=Ct(s):"class"===o?Dt(e,n,s):"style"===o?Vt(e,n,s):o.startsWith("style-")?Ot(n,o.slice(6),s):Tt.has(o)&&o in n?n[o]="value"===o?Ct(s):Boolean(s):null==s||!1===s?n.removeAttribute(o):n.setAttribute(o,!0===s?"":Ct(s));return!0}};function Dt(e,t,n){let o=Wt.get(e);o||Wt.set(e,o=new WeakMap);for(const e of o.get(t)||[])t.classList.remove(e);const s=n?Ct(n).split(/\s+/).filter(Boolean):[];for(const e of s)t.classList.add(e);o.set(t,s)}function Ot(e,t,n){null!=n&&!1!==n&&""!==n?e.style.setProperty(t,Ct(n)):e.style.removeProperty(t)}function Nt(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function Vt(e,t,n){if(null!=n&&"object"!=typeof n)return void wt(`bind:style:${e.id}`,`data-bind-style="${e.expr}" needs an object of CSS properties - got `+typeof n+". For a single property use data-bind-style-<property>.");let o=Ht.get(e);o||Ht.set(e,o=new WeakMap);const s=o.get(t)||[],i=[];for(const[e,o]of Object.entries(n||{})){const n=Nt(e);Ot(t,n,o),i.push(n)}for(const e of s)i.includes(e)||t.style.removeProperty(e);o.set(t,i)}const Pt=Symbol("dm:option-value"),Rt=Symbol("dm:pending-value"),Ft={attribute:"data-options",expression:!0,tracks:!0,primes:!0,update({binding:e,nodes:t,context:n}){const o=ft(e.evaluate(n));for(const s of t)Ut(e,s,o,n);return!0}};function qt(e,t){const n=e.getAttribute(t);return null===n||""===n.trim()?null:tt(n)}function Ut(e,t,n,o){if("SELECT"!==t.tagName)return void wt(`options:${e.id}`,`data-options="${e.expr}" is on <${t.tagName.toLowerCase()}>, which has no options. Put it on a <select>.`);const s=qt(t,"data-options-text"),i=qt(t,"data-options-value"),r=qt(t,"data-options-caption"),a=Rt in t?[].concat(t[Rt]):function(e){return[...e.options].filter(e=>e.selected).map(e=>Pt in e?e[Pt]:e.value)}(t);if(t.textContent="",r){const e=document.createElement("option");e.value="",e.textContent=Ct(r(o)),t.appendChild(e)}n.forEach((e,r)=>{const a=Le(o,e,r,n.length),l=document.createElement("option");l.textContent=Ct(s?s(a):e);const d=i?i(a):e;null==d||"object"==typeof d?(l.value=`\0opt:${r}`,l[Pt]=d):"string"!=typeof d?(l.value=Ct(d),l[Pt]=d):l.value=d,t.appendChild(l)}),function(e,t){if(0===t.length)return;let n=!1;for(const o of e.options){const s=Pt in o?o[Pt]:o.value,i=t.some(e=>e===s);e.multiple?(o.selected=i,n=n||i):i&&!n&&(o.selected=!0,n=!0)}e.multiple||n||(e.selectedIndex=e.options.length>0?0:-1);n&&delete e[Rt]}(t,a)}const Kt={attribute:"data-model",expression:!0,tracks:!0,primes:!0,update({binding:e,nodes:t,context:n}){const o=e.evaluate(n);for(const e of t)Xt(e,o);return!0},attach({binding:e,node:t,controller:n}){const o=()=>{const o=n.context(),s=Et(e.ast,o);if(null===s)return void wt(`model:${e.id}:${e.expr}`,`data-model="${e.expr}" is not a settable path, so nothing was written`);const i=function(e){switch(Jt(e)){case"checkbox":return e.checked;case"radio":return e.checked?e.value:Yt;case"select-multiple":return Array.from(e.options).filter(e=>e.selected).map(Gt);case"select":return-1===e.selectedIndex?"":Gt(e.options[e.selectedIndex]);case"number":return""===e.value?null:Number(e.value);default:return e.value}}(t);i!==Yt&&(s.object[s.key]=i)},s=function(e){const t=Jt(e);return"text"===t||"number"===t?["input","change"]:["change"]}(t);for(const e of s)t.addEventListener(e,o);let i=jt.get(t);i||jt.set(t,i=new Map),i.set(e.id,{type:s,listener:o})},detach({binding:e,node:t}){const n=jt.get(t)?.get(e.id);if(n){for(const e of n.type)t.removeEventListener(e,n.listener);jt.get(t).delete(e.id)}}},Yt=Symbol("no-write");function Jt(e){const t=e.tagName;if("SELECT"===t)return e.multiple?"select-multiple":"select";if("INPUT"!==t)return"text";const n=String(e.type||"").toLowerCase();return"checkbox"===n||"radio"===n?n:"number"===n||"range"===n?"number":"text"}function Gt(e){return Pt in e?e[Pt]:e.value}function Xt(e,t){switch(Jt(e)){case"checkbox":{const n=Boolean(t);return void(e.checked!==n&&(e.checked=n))}case"radio":{const n=Ct(t)===e.value;return void(e.checked!==n&&(e.checked=n))}case"select-multiple":{const n=Array.isArray(t)?t:[];if(0===e.options.length)return void(n.length>0&&(e[Rt]=n));const o=new Set(n.map(Ct));for(const t of e.options){const e=Gt(t),s=n.some(t=>t===e)||o.has(t.value);t.selected!==s&&(t.selected=s)}return}case"select":{const n=function(e,t){return[...e.options].find(e=>Gt(e)===t)||null}(e,t);if(n)return n.selected||(n.selected=!0),void delete e[Rt];const o=Ct(t);return e.value!==o&&(e.value=o),void(e.value!==o?e[Rt]=t:delete e[Rt])}default:{const n=Ct(t);e.value!==n&&(e.value=n)}}}const Zt=new WeakSet,Qt={attribute:"data-focus",expression:!0,tracks:!0,primes:!0,update({binding:e,nodes:t,context:n}){const o=mt(e.evaluate(n));for(const e of t){if("function"!=typeof e.focus)continue;if(o!==(e.ownerDocument.activeElement===e)){Zt.add(e);try{o?e.focus():e.blur()}finally{Zt.delete(e)}}}return!0},attach({binding:e,node:t,controller:n}){const o=o=>{if(Zt.has(t))return;const s=n.context(),i=Et(e.ast,s);null!==i?i.object[i.key]="focus"===o.type:wt(`focus:${e.id}:${e.expr}`,`data-focus="${e.expr}" is not a settable path, so focus was not written back. Focus still follows the value.`)},s=["focus","blur"];for(const e of s)t.addEventListener(e,o);let i=jt.get(t);i||jt.set(t,i=new Map),i.set(e.id,{type:s,listener:o})},detach({binding:e,node:t}){const n=jt.get(t)?.get(e.id);if(n){for(const e of n.type)t.removeEventListener(e,n.listener);jt.get(t).delete(e.id)}}};Mt("text",St),Mt("attr",At),Mt("block",$t),Mt("raw",$t),Mt("if",zt),Mt("event",Bt),Mt("bind",It),Mt("model",Kt),Mt("options",Ft),Mt("focus",Qt);const en=new WeakMap;let tn=0;function nn(e,t){if(null==e||"function"!=typeof t)return;let n=en.get(e);n||en.set(e,n=new Set),n.add(t),tn++}function on(e){const t=en.get(e);if(t){en.delete(e),tn-=t.size;for(const e of t)try{e()}catch(e){console.warn("[Domma Reactive] a disposer threw:",e)}}}function sn(e){if(0===tn||null==e)return;if(on(e),1!==e.nodeType&&11!==e.nodeType)return;const t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_COMMENT,null),n=[];let o;for(;o=t.nextNode();)en.has(o)&&n.push(o);for(const e of n)on(e)}const rn=["data-dm-t","data-dm-a","data-dm-b"];rn.map(e=>`[${e}]`).join(",");const an=e=>`\x3c!--dm:${e}--\x3e`,ln=e=>`\x3c!--/dm:${e}--\x3e`;function dn(e){const t=document.createElement("template");return t.innerHTML=e,t.content}function cn(e,t){const n=[];for(let o=e.nextSibling;o&&o!==t;o=o.nextSibling)n.push(o);return n}function hn(e,t,n){const o=e.parentNode;if(!o)return;let s=e.nextSibling;for(;s&&s!==t;){const e=s.nextSibling;sn(s),o.removeChild(s),s=e}n&&o.insertBefore(dn(n),t)}const un="[Domma Reactive]";function pn(e){const{bindings:t,getRoots:n,render:o,reactive:s=!1,label:i="",repaint:r=null}=e,a=new Map(t.map(e=>[e.id,e]));for(const e of t)e.seen=new WeakSet;const l=new Map;let d=[],c=!1,h=!1,u=Ee(e.context);function p(){h||(function(e,t,n){for(const e of n)e.nodes=null;const o=(e,n)=>{const o=t.get(e);o&&(o.nodes||=[]).push(n)},s=e=>{for(const t of rn){const n=e.getAttribute(t);if(null!==n)for(const t of n.split(/\s+/))o(t,e)}},i=new Map,r=e=>{const t=e.data;if(t.startsWith("/dm:")){const n=t.slice(4),s=i.get(n);if(!s)return;o(n,{open:s,close:e}),i.delete(n)}else t.startsWith("dm:")&&i.set(t.slice(3),e)};for(const t of e){if(8===t.nodeType){r(t);continue}if(1!==t.nodeType&&11!==t.nodeType)continue;1===t.nodeType&&s(t);const e=t.ownerDocument.createTreeWalker(t,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_COMMENT,null);let n;for(;n=e.nextNode();)8===n.nodeType?r(n):s(n)}}(n(),a,t),function(){for(const e of t){if(null===e.nodes){f(e.id);continue}const t=xt(e.kind);let n=!1;for(const o of e.nodes){const s=void 0===o.nodeType?o.open:o;e.seen.has(s)||(e.seen.add(s),n=!0,void 0!==o.nodeType&&t?.attach?.({binding:e,node:o,controller:g}))}n&&(s||!0===e.prime)&&d.push(e)}}(),function(){if(c)return;c=!0;try{let e=0;for(;d.length>0;){if(++e>20){console.warn(`${un} a binding kept revealing new nodes after 20 rounds; giving up so the page still renders. Kinds still pending: ${[...new Set(d.map(e=>e.kind))].join(", ")}`);break}const t=d;d=[];for(const e of[!0,!1])for(const n of t)!0===xt(n.kind)?.region===e&&m(n)}}finally{c=!1,d=[]}}())}function m(e){if(!s)return void g.update(e.id);const t=l.get(e.id);!t||t.disposed?l.set(e.id,ce(()=>g.update(e.id),{label:`${i||"binding"}:${e.id}`})):t.recompute()}function f(e){const t=l.get(e);t&&(l.delete(e),t.dispose())}const g={bindings:t,deps:e=>a.get(e)?.deps||new Set,context:()=>u,setContext(e){u=Ee(e)},refresh(e=null){for(const n of t)null!==n.nodes&&0!==n.nodes.length&&(null!==e&&!0!==e(n)||m(n))},index:p,update(e,t){if(void 0!==t&&(u=Ee(t)),h)return!1;const n=a.get(e);if(!n||!n.nodes||0===n.nodes.length)return!1;const s=xt(n.kind);return void 0!==s&&!0===s.update({binding:n,nodes:n.nodes,context:u,render:o,replaceRegion:hn,reindex:p,controller:g})},updateAll(e){void 0!==e&&(u=Ee(e));for(const e of t)g.update(e.id)},rerenderAll(e){void 0!==e&&(u=Ee(e)),r?.(u),p()},rerender(e){g.rerenderAll(e)},destroy(){h=!0;for(const e of t){const t=xt(e.kind);if(void 0!==t?.detach&&null!==e.nodes)for(const n of e.nodes)void 0!==n.nodeType&&t.detach({binding:e,node:n,controller:g})}for(const e of l.values())e.dispose();l.clear();for(const e of n())sn(e)},effectCount:()=>l.size};return g}const mn=new WeakMap,fn=new Set;function gn(e,t){fn.has(e)||(fn.add(e),console.warn(`[Domma Reactive] ${t}`))}function vn(e,t,n,o,s,i={}){const r=document.createComment("dm:item"),a=document.createComment("/dm:item"),l=e.content.cloneNode(!0);l.insertBefore(r,l.firstChild),l.appendChild(a);const d=pn({bindings:e.bindings.map(e=>({...e})),render:e.render,context:i.context??Le(t,n,o,s),getRoots:()=>cn(r,a),reactive:!0,label:e.label}),c={key:null,item:n,index:o,length:s,parentContext:t,open:r,close:a,runtime:d,disposed:!1,allNodes:()=>[r,...cn(r,a),a],refresh(t,n,o,s){const i=t.$data!==c.parentContext.$data||t.$root!==c.parentContext.$root||n!==c.item,r=o!==c.index||!0===e.usesLength&&s!==c.length;return c.item=n,c.index=o,c.length=s,c.parentContext=t,!(!i&&!r)&&(d.setContext(Le(t,n,o,s)),d.refresh(i?null:e=>!0===e.positional),!0)},dispose(e=!0){if(c.disposed)return;c.disposed=!0,function(e,t){const n=en.get(e);!n||!n.delete(t)||(tn--,0===n.size&&en.delete(e))}(r,h),d.destroy();for(const e of cn(r,a))sn(e);if(!e)return;const t=r.parentNode;if(t)for(const e of c.allNodes())t.removeChild(e)}},h=()=>c.dispose(!1);return nn(r,h),d.index(),c}function yn(e,t){let n=e;for(const e of t.split(".")){if(null==n)return;n=n[e]}return n}function bn(e,t,n,o,s,i){let r=mn.get(e.open);void 0===r&&(r={byKey:new Map},mn.set(e.open,r),nn(e.open,()=>{for(const e of r.byKey.values())e.dispose(!1);r.byKey=new Map}));const a=r.byKey,l=new Map,d=[],c=ft(t);for(let e=0;e<c.length;e++){const t=c[e];let r=yn(t,o);null==r?(gn(`key:missing:${i}:${o}`,`key=${o} is missing on an item of ${i} - falling back to position for that item, which reconciles no better than an unkeyed block. Give every item a stable identifier.`),r=`\0position:${e}`):l.has(r)&&(gn(`key:duplicate:${i}:${o}`,`two items of ${i} share key=${o} value "${String(r)}" - a key must identify exactly one item. The duplicate is being kept apart by position, so it will not reconcile across changes.`),r=`\0duplicate:${e}:${String(r)}`);let h=a.get(r);void 0===h?(h=vn(n,s,t,e,c.length),h.key=r):(a.delete(r),h.refresh(s,t,e,c.length)),l.set(r,h),d.push(h)}for(const e of a.values())e.dispose();!function(e,t){const n=e.parentNode;if(!n)return;let o=e;for(const e of t)if(o.nextSibling!==e.open)for(const t of e.allNodes())n.insertBefore(t,o.nextSibling),o=t;else o=e.close}(e.open,d),r.byKey=l}function kn(e){return{tracks:!0,region:!0,primes:!0,update({binding:t,nodes:n,context:o,render:s}){const i=e(t,s),r=(a=t.evaluate(o),Array.isArray(a)?a:null!==a&&"object"==typeof a&&Array.isArray(a.value)?a.value:[]);var a;for(const e of n)bn(e,r,i,t.keyPath,o,i.label);return!0}}}const _n="[Domma Reactive]",wn=new Map,Mn=new Set;function xn(e,t){Mn.has(e)||(Mn.add(e),console.warn(`${_n} ${t}`))}function Ln(e){return wn.get(e)}const Cn="data-param-";function En(e){return e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function Sn(e,t,n){const o={},s=e.getAttribute("data-params");if(null!==s&&""!==s.trim()){const e=tt(s),i=null===e?null:e(n);null===e?xn(`component:params:${t.id}`,`data-params="${s}" did not parse, in ${t.expr}`):null===i||"object"!=typeof i?xn(`component:params:${t.id}`,`data-params="${s}" needs an object of params - got ${null===i?"null":typeof i}, in ${t.expr}`):Object.assign(o,i)}for(const s of[...e.attributes]){if(!s.name.startsWith(Cn))continue;const e=En(s.name.slice(11));if(""===e)continue;const i=tt(s.value);null!==i?(e in o&&xn(`component:collide:${t.id}:${e}`,`"${e}" is given by both data-params and ${s.name}, in ${t.expr}. The attribute wins, but one of the two is redundant.`),o[e]=i(n)):xn(`component:param:${t.id}:${e}`,`${s.name}="${s.value}" did not parse, in ${t.expr}`)}return Object.freeze(o)}function An(e){const t=new Map;for(const n of[...e.childNodes]){const e=1===n.nodeType?n.getAttribute("data-slot")??"":"";t.has(e)||t.set(e,[]),t.get(e).push(n),n.remove()}return t}function $n(e,t){const n=`dm:${t}`,o=`/dm:${t}`;let s=null,i=null;const r=e=>{if(8!==e.nodeType)for(const t of e.childNodes)r(t);else e.data===n?s=e:e.data===o&&(i=e)};for(const t of e)if(r(t),null!==s&&null!==i)return{open:s,close:i};return null}function zn(e,t){const n=[];for(let o=e.nextSibling;null!==o&&o!==t;o=o.nextSibling)n.push(o);return n}function jn(e,t,n,o,s){const i=[],r=e.allNodes(),a=new Set;for(const e of t.slots??[]){if(a.has(e.name)){xn(`component:slot:duplicate:${o.id}:${s}:${e.name}`,`the component "${s}" declares more than one `+(""===e.name?"default slot":`slot named "${e.name}"`)+". The first is filled and the rest keep their fallback content.");continue}a.add(e.name);const t=n.get(e.name);if(void 0===t||0===t.length)continue;const l=$n(r,e.id);if(null!==l){for(const e of zn(l.open,l.close))e.remove();for(const e of t)l.close.parentNode.insertBefore(e,l.close);i.push({name:e.name,nodes:t})}}for(const[e,t]of n)a.has(e)||0===t.length||t.every(e=>3===e.nodeType&&""===e.data.trim())||xn(`component:slot:unmatched:${o.id}:${s}:${e}`,""===e?`the component "${s}" was given content but declares no {{#slot}}, so that content is not rendered. Add a slot to its template, or remove the content.`:`the component "${s}" has no slot named "${e}", so that content is not rendered. Check data-slot against the template's {{#slot}} blocks.`);return i}const Bn=new WeakMap;function Tn(e,t,n,o,s){if(void 0===e.create)return t;try{return e.create(t,{element:n})}catch(e){return xn(`component:create:${o.id}:${s}`,`the component "${s}" threw while being created, in ${o.expr}: ${e&&e.message}`),null}}function Wn(e){if(null===e.instance)return;for(const{nodes:t}of e.placed)for(const e of t)e.remove();e.placed=[];const t=e.viewModel;if(null!==t&&"object"==typeof t&&"function"==typeof t.dispose)try{t.dispose()}catch(e){console.warn(`${_n} a component's dispose() threw:`,e)}e.instance.dispose(),e.instance=null,e.viewModel=null,e.name=null}const Hn="[Domma Reactive]",In=/\{\{([#/])(if|unless|each|with|slot)(?:\s+([^}]+?))?\s*\}\}/g,Dn=/\{\{\{\s*([^{}]+?)\s*\}\}\}/g,On=/\{\{(?!\{)\s*([^#/>!{}][^{}]*?)\s*\}\}/g,Nn=/\{\{>\s*[^{}]+?\s*\}\}/,Vn=/\sdata-each\s*=\s*(?:"([^"]*)"|'([^']*)')/,Pn=/<([a-zA-Z][\w:-]*)((?:"[^"]*"|'[^']*'|[^>"'])*?)(\/?)>/g,Rn=/([\w:@.-]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/g,Fn=/^[A-Za-z_$][\w$]*(?:\.[\w$]+)*$/,qn=/&(?:lt|gt|quot|apos|nbsp|amp|#39|#x27);/g,Un={"&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&#39;":"'","&#x27;":"'","&nbsp;":" ","&amp;":"&"};function Kn(e){return e.includes("&")?e.replace(qn,e=>Un[e]):e}const Yn=/^[@.]/,Jn={".":e=>e.$data,"@index":e=>e.$index,"@first":e=>0===e.$index,"@last":e=>null!==e.$length&&e.$index===e.$length-1},Gn=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Xn={text:"txt",attr:"attr",raw:"raw",block:"blk"};function Zn(e,t){if(0===t.length)return e;const n=[...t].sort((e,t)=>e.index-t.index||(e.order??0)-(t.order??0));let o="",s=0;for(const t of n)t.index<s||(o+=e.slice(s,t.index)+t.text,s=t.index+(t.skip??0));return o+e.slice(s)}function Qn(e,t){for(const[n,o]of t)if(e>=n&&e<o)return!0;return!1}function eo(e){return String(e).trim().split(".")[0]}function to(e,t){const n=String(t).trim().split(".");let o=e;for(const e of n){if(null==o)return;o=o[e]}return o}function no(e){const t=new Set;for(const n of e.matchAll(On)){const e=n[1].trim();Fn.test(e)&&t.add(eo(e))}for(const n of e.matchAll(Dn)){const e=n[1].trim();Fn.test(e)&&t.add(eo(e))}return t}function oo(e){const t=[],n=[];for(const o of e.matchAll(In)){if("#"===o[1]){t.push({start:o.index,kind:o[2],expr:(o[3]||"").trim()});continue}let e=null;for(;t.length>0;){const n=t.pop();if(n.kind===o[2]){e=n;break}}e&&n.push({start:e.start,end:o.index+o[0].length,kind:e.kind,expr:e.expr})}return n}function so(e,t){const n=e.lastIndexOf("<",t);return-1!==n&&n>e.lastIndexOf(">",t)}function io(e,t){const n=t[1],o=t.index,s=o+t[0].length;if("/"===t[3]||Gn.has(n.toLowerCase()))return[o,s];const i=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=new RegExp(`<(/?)${i}(?=[\\s/>])`,"gi");let a=1;for(const t of e.slice(s).matchAll(r)){const n=s+t.index;if("/"===t[1]){if(a--,a>0)continue;const t=e.indexOf(">",n);return-1===t?null:[o,t+1]}const i=e.indexOf(">",n);-1!==i&&"/"===e[i-1]||a++}return null}function ro(e,t){const n=[];for(const o of t){if("each"!==o.kind&&"with"!==o.kind)continue;const t=e.indexOf(an(o.id)),s=e.indexOf(ln(o.id));-1!==t&&-1!==s&&n.push([t,s])}return n}const ao=/^([\s\S]*?)\s+key\s*=\s*([A-Za-z_$][\w$]*(?:\.[\w$]+)*)\s*$/,lo=/\s+key\s*=\s*[A-Za-z_$][\w$]*(?:\.[\w$]+)*/,co=new Set;function ho(e){const t=ao.exec(String(e));return null===t||""===t[1].trim()?null:{collection:t[1].trim(),key:t[2]}}function uo(e,t){const n=/^\{\{#(?:if|unless|each|with|slot)(?:\s+[^}]*?)?\s*\}\}/.exec(e.slice(t.start,t.end)),o=/\{\{\/(?:if|unless|each|with|slot)\s*\}\}$/.exec(e.slice(t.start,t.end));return null===n||null===o?[t.start,t.end]:[t.start+n[0].length,t.start+o.index]}function po(e,t){const n=[];for(const o of t){if(!0!==xt(o.kind)?.capturesBody)continue;const t=an(o.id),s=e.indexOf(t),i=e.indexOf(ln(o.id));-1!==s&&-1!==i&&n.push([s+t.length,i])}n.sort((e,t)=>e[0]-t[0]);let o="",s=0;for(const[t,i]of n)t<s||(o+=e.slice(s,t),s=i);return o+=e.slice(s),o.replace(/\{\{\{[^{}]*\}\}\}/g,"").replace(/\{\{[^{}]*\}\}/g,"")}const mo=/\$index|\$length|@index|@first|@last/;function fo(e){const t=(e.parts??[]).map(e=>e.tmpl).join(" ");return`${e.expr??""} ${e.body??""} ${t}`}let go=0;function vo(e,t,n,o,s){const{annotated:i,bindings:r,slots:a}=wo(e,{...o,itemForms:!0,template:t,idPrefix:s});for(const e of r)e.positional=mo.test(fo(e));return{content:dn(po(i,r)),bindings:r,slots:a,render:n,label:t,options:o,usesLength:/@last|\$length/.test(e)}}function yo(e,t){if(!1===t.warnUnkeyed)return;const n=`${t.template??""}|${e}`;if(co.has(n))return;co.add(n);const o=t.template?` in template "${t.template}"`:"";console.warn(`${Hn} {{#each ${e}}}${o} has no key=, so it re-renders the whole block on every change - losing DOM node identity, focus and uncommitted input. Write {{#each ${e} key=id}}, naming whichever property identifies an item, to reconcile instead.`)}function bo(e,t){const n=`demoted|${t.template??""}|${e}`;if(co.has(n))return;co.add(n);const o=t.template?` in template "${t.template}"`:"";console.warn(`${Hn} {{#each ${e}}}${o} sits inside an unkeyed {{#each}} or a {{#with}}, so it cannot reconcile: its collection would be resolved against the top-level data. It has been demoted to a plain re-rendered block. Add key= to the ENCLOSING block and both will reconcile.`)}function ko(e,t){return null===e.factoryBox.value&&(e.factoryBox.value=function(e,t,n){const o=`${n.template?`${n.template} `:""}{{#each ${e.expr}}}`;return Nn.test(e.body)&&console.warn(`${Hn} {{> partial}} inside a keyed {{#each}} is not expanded - the block body is compiled once into a <template>, before any render pass exists to resolve a partial against. Inline it, in ${o}`),vo(e.body,o,t,n,`i${++go}:`)}(e,t,e.factoryBox.options)),e.factoryBox.value}function _o(e,t,n){const o={...n,methodCalls:!0===t.methodCalls},s=Qe(e,o);return null===s?null:{ast:s,evaluate:tt(e,o),deps:!1===t.tracks?new Set:nt(s)}}function wo(e,t={}){const n=[],o=[],s=new Set,i=t.idPrefix??"",r=(e,n)=>{if(s.has(e))return;s.add(e);const o=t.template?` in template "${t.template}"`:"";console.warn(`${Hn} ${n}${o}`)},a=Vn.exec(e);if(null!==a){const e=a[1]??a[2]??"";r("inert-each",`data-each="${e}" does nothing here. It is an applyBindings spelling, and this is compiled markup - write {{#each ${e}}} … {{/each}} instead. A data-each nested inside another list is compiled markup too, which is the usual way to meet this`)}for(const t of e.matchAll(Pn)){const e=t[2]||"";if(!e.includes("data-param-"))continue;if(/\sdata-component\s*=/.test(e))continue;const n=/\s(data-param-[\w-]+)/.exec(e);r("orphan-param",`${null===n?"data-param-*":n[1]} does nothing on an element with no data-component. Check the component attribute is present and spelled correctly - and remember its value is an expression, so a literal name takes quotes: data-component="'my-thing'"`)}const l=oo(e),d=function(e){const t=[];for(const n of e.matchAll(Pn)){const o=n[2]||"";if(o.includes("data-"))for(const s of o.matchAll(Rn)){const o=Lt(s[1]);if(null===o||!o.handler.region)continue;const i=io(e,n);if(null===i)break;t.push({start:i[0],end:i[1],kind:o.kind,arg:o.arg,expr:Kn(void 0!==s[2]?s[2]:s[3]||"").trim()});break}}return t}(e),c=[],h=new Set,u=l.filter(e=>"with"===e.kind||"each"===e.kind&&null===ho(e.expr)).map(e=>[e.start,e.end]);for(const e of l)"each"===e.kind&&null!==ho(e.expr)&&(u.some(([t,n])=>e.start>t&&e.end<=n)?(h.add(e.start),bo(e.expr,t)):c.push([e.start,e.end]));const p=(e,t)=>c.some(([n,o])=>e>n&&t<=o),m=[...l.map((e,t)=>({...e,id:`${i}${t}_blk`,mustache:!0})).filter(e=>!p(e.start,e.end)),...d.map((e,t)=>({...e,id:`${i}${l.length+t}_${e.kind}`})).filter(e=>!p(e.start,e.end))],f=[];for(const n of m){if(n.mustache&&h.has(n.start)){const t=e.slice(n.start,n.end),o=lo.exec(t);null!==o&&f.push({index:n.start+o.index,text:"",order:1,skip:o[0].length}),n.expr=ho(n.expr)?.collection??n.expr}if(n.mustache&&"slot"===n.kind){const[t,s]=uo(e,n);f.push({index:n.start,text:an(n.id),order:1,skip:t-n.start}),f.push({index:s,text:ln(n.id),order:0,skip:n.end-s}),o.push({id:n.id,name:n.expr});continue}const s=n.mustache&&"each"===n.kind&&!h.has(n.start)&&ho(n.expr);if(s){f.push({index:n.start,text:an(n.id)+ln(n.id),order:1,skip:n.end-n.start}),n.keyed=s;const[t,o]=uo(e,n);n.rawBody=e.slice(t,o);continue}n.mustache&&"each"===n.kind&&yo(n.expr,t),f.push({index:n.start,text:an(n.id),order:1}),f.push({index:n.end,text:ln(n.id),order:0})}let g=Zn(e,f),v=m.length;const y=e=>`${i}${v++}_${Xn[e]??e}`;for(const e of m){if("slot"===e.kind)continue;if(-1===g.indexOf(an(e.id)))continue;if(e.keyed){const o=xt("each"),s=_o(e.keyed.collection,o,t);if(null===s)continue;n.push({id:e.id,kind:"each",blockKind:"each",expr:e.keyed.collection,keyPath:e.keyed.key,body:e.rawBody,ast:s.ast,evaluate:s.evaluate,deps:s.deps,prime:!0===o.primes,factoryBox:{value:null,options:t},nodes:null});continue}if(e.mustache){n.push({id:e.id,kind:"block",blockKind:e.kind,expr:e.expr,body:"",deps:Fn.test(e.expr)?new Set([eo(e.expr)]):no(e.expr),nodes:null});continue}const o=xt(e.kind),s=_o(e.expr,o,t);null!==s&&n.push({id:e.id,kind:e.kind,arg:e.arg,expr:e.expr,body:"",ast:s.ast,evaluate:s.evaluate,deps:s.deps,prime:!0===o.primes,nodes:null})}const b=[];for(const e of[...g.matchAll(Dn)]){if(Qn(e.index,ro(g,m)))continue;const t=e[1].trim();if(!Fn.test(t))continue;const o=y("raw");b.push({index:e.index,text:an(o),order:1}),b.push({index:e.index+e[0].length,text:ln(o),order:0}),n.push({id:o,kind:"raw",expr:t,body:e[0],deps:new Set([eo(t)]),nodes:null})}g=Zn(g,b);const k=n.filter(e=>"raw"===e.kind).map(e=>{const t=g.indexOf(an(e.id)),n=g.indexOf(ln(e.id));return-1!==t&&-1!==n?[t,n+ln(e.id).length]:null}).filter(Boolean),_=ro(g,m),w=[];for(const e of[...g.matchAll(On)]){if(Qn(e.index,_))continue;if(Qn(e.index,k))continue;if(so(g,e.index))continue;const o=Mo(e[1].trim(),t,r);if(null===o)continue;const s=y("text");w.push({index:e.index,text:`<span data-dm-t="${s}">`,order:1}),w.push({index:e.index+e[0].length,text:"</span>",order:0}),n.push({id:s,...o,nodes:null})}g=Zn(g,w);const M=ro(g,m),x=[];for(const e of[...g.matchAll(Pn)]){const o=e[2]||"",s=Qn(e.index,M),i=[],a=[];for(const e of o.matchAll(Rn)){const o=e[1];if(o.startsWith("data-dm-"))continue;const l=void 0!==e[2]?e[2]:e[3]||"",d=Lt(o);if(null!==d){if(d.handler.region)continue;if(s){r(`shifted:${o}`,`"${o}" inside an {{#each}} or {{#with}} block is not bound - per-item bindings arrive with the reconciler. Move it outside the block, or wire it up imperatively for now`);continue}const e=d.handler,i=Kn(l).trim(),c=!1===e.expression?{ast:null,evaluate:null,deps:new Set}:_o(i,e,t);if(null===c)continue;const h=y(d.kind);a.push(h),n.push({id:h,kind:d.kind,arg:d.arg,expr:i,ast:c.ast,evaluate:c.evaluate,deps:c.deps,prime:!0===e.primes,nodes:null});continue}if(s)continue;if(!l.includes("{{"))continue;const c=no(l);0!==c.size&&i.push({name:o,tmpl:l,deps:[...c]})}const l=e.index+e[0].length-(e[3]?2:1);if(i.length>0){const e=y("attr"),t=new Set;for(const e of i)for(const n of e.deps)t.add(n);x.push({index:l,text:` data-dm-a="${e}"`,order:1}),n.push({id:e,kind:"attr",parts:i,deps:t,nodes:null})}a.length>0&&x.push({index:l,text:` data-dm-b="${a.join(" ")}"`,order:1})}g=Zn(g,x);for(const e of n){if(!0!==xt(e.kind)?.capturesBody)continue;const t=an(e.id),n=g.indexOf(t),o=g.indexOf(ln(e.id));-1!==n&&-1!==o&&(e.body=g.slice(n+t.length,o))}return{annotated:g,bindings:n,slots:o}}function Mo(e,t,n){if(!0===t.itemForms&&void 0!==Jn[e])return{kind:"text",expr:e,evaluate:Jn[e],deps:new Set,prime:!0};if(Fn.test(e)){if(e.startsWith("$")){const n=_o(e,xt("text"),t);return null===n?null:{kind:"text",expr:e,ast:n.ast,evaluate:n.evaluate,deps:n.deps,prime:!0}}return{kind:"text",expr:e,evaluate:t=>to(t.$data,e),deps:new Set([eo(e)]),prime:!1}}if(Yn.test(e)||!ht.test(e))return null;const o=_o(e,xt("text"),t);return null===o?(n(`expr:${e}`,`"{{${e}}}" is not bound`),null):{kind:"text",expr:e,ast:o.ast,evaluate:o.evaluate,deps:o.deps,prime:!0}}Mt("each",kn(ko));const xo=new WeakMap;!function(e){Mt("component",function(e){return{tracks:!0,primes:!0,attribute:"data-component",expression:!0,update({binding:t,nodes:n,context:o,render:s}){const i=t.evaluate(o);for(const r of n){let n=Bn.get(r);if(void 0===n&&(n={name:null,instance:null,viewModel:null,slots:null,placed:[]},Bn.set(r,n),nn(r,()=>Wn(n))),n.name===i&&null!==n.instance)continue;if(Wn(n),null===n.slots&&(n.slots=An(r)),r.replaceChildren(),"string"!=typeof i||""===i){xn(`component:name:${t.id}`,`data-component="${t.expr}" needs a component name - got `+(null===i?"null":typeof i)+". Remember that a literal name takes quotes, because every binding value is an expression: data-component=\"'my-thing'\"");continue}const a=Ln(i);if(void 0===a){xn(`component:missing:${t.id}:${i}`,`no component is registered as "${i}", in ${t.expr}`);continue}const l=Tn(a,Sn(r,t,o),r,t,i);if(null===l)continue;const d=e(a,i,s,t.options??{});n.name=i,n.viewModel=l,n.instance=vn(d,o,l,null,null,{context:Ce(o,l)}),n.placed=jn(n.instance,d,n.slots,t,i),n.placed.length>0&&n.instance.runtime.index(),r.append(...n.instance.allNodes())}return!0},detach({node:e}){const t=Bn.get(e);void 0!==t&&Wn(t)}}}(e))}(function(e,t,n,o){let s=xo.get(e);return void 0===s&&(s=function(e,t,n,o){return vo(e,t,n,o,`c${++go}:`)}(e.template,`component ${t}`,n,o),xo.set(e,s)),s});const Lo={annotate:wo,compile:function(e,t,n,o,s={}){const i="function"==typeof o?o:yt,{annotated:r,bindings:a}=wo(e,s),l=e=>{n.replaceChildren(dn(i(r,e.$data)))},d=pn({bindings:a,render:i,context:Ee(t),getRoots:()=>[...n.childNodes],reactive:!0===s.reactive,label:s.template,repaint:l});return l(d.context()),d.index(),d},scanBlocks:oo,resolvePath:to},Co="[Domma Reactive]",Eo="data-each",So=/^([\s\S]*?)\s+key\s*=\s*([A-Za-z_$][\w$]*(?:\.[\w$]+)*)\s*$/,Ao=/^\s*dm\s+([a-zA-Z][\w-]*)\s*:\s*([\s\S]+?)\s*$/,$o=/^\s*\/dm\s*$/,zo=/\{\{\s*[\w$][\w$.]*\s*\}\}/,jo="data-dm-bound",Bo=new WeakSet,To=new Set;function Wo(e,t){To.has(e)||(To.add(e),console.warn(`${Co} ${t}`))}function Ho(e){if(!e||1!==e.nodeType)return String(e);const t=e.id?`#${e.id}`:"",n=e.classList?.length?`.${[...e.classList].join(".")}`:"";return`<${e.tagName.toLowerCase()}${t}${n}>`}function Io(e,t){if(null!=e&&1===e.nodeType&&!1!==t(e))for(const n of[...e.children])Io(n,t)}function Do(e,t,n={}){if(null==t||1!==t.nodeType)throw new TypeError(`${Co} applyBindings: expected an element to activate, got ${String(t)}`);const o="function"==typeof n.render?n.render:yt,s=n.template||Ho(t);let i=Ee(e);const r=[],a=[],l=[];let d=!1,c=0;const h={context:()=>i,update:()=>!1,bindings:[]},u=function(e,t){const n=[];let o=0;const s=e=>{const i=[];for(const t of[...e.childNodes]){if(8===t.nodeType){if($o.test(t.data)){const e=i.pop();void 0!==e&&n.push({...e,close:t});continue}const s=t.data.match(Ao);null!==s&&i.push({kind:s[1],expr:s[2],open:t,parent:e,seq:o++});continue}1===t.nodeType&&s(t)}for(const e of i)t(e)};return s(e),n.sort((e,t)=>e.seq-t.seq)}(t,e=>{Wo(`virtual:unclosed:${s}:${e.kind}`,`\x3c!-- dm ${e.kind}: ${e.expr} --\x3e in ${s} has no matching \x3c!-- /dm --\x3e, so the block was skipped. Every virtual binding needs a closer.`)});for(const e of u)"each"===e.kind&&y(e,u);const p=[];Io(t,e=>{if(Bo.has(e))return c++,!1;const t=e.getAttribute(Eo),n=function(e){const t=[];for(const n of[...e.attributes]){if(n.name===jo||n.name===Eo)continue;const e=Lt(n.name);null!==e&&t.push({name:n.name,value:n.value.trim(),kind:e.kind,arg:e.arg,handler:e.handler})}return t}(e);return null===t&&0===n.length||(p.push({el:e,each:t,claims:n}),null===t)}),c>0&&Wo(`double:${s}`,`applyBindings ran again over ${s}, where ${c} element(s) were already bound. Those were skipped rather than bound twice; the handle returned owns only what this call created. Dispose the first handle before re-applying.`);for(const{el:e}of p)Bo.add(e),e.setAttribute(jo,""),l.push(e);!function(e,t){const n=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT,null);let o;for(;o=n.nextNode();)if(zo.test(o.data)&&!Oo(o,e))return void Wo(`interp:${t}`,`${t} contains "${o.data.trim().slice(0,40)}" - applyBindings does not interpolate {{ }} in already-rendered DOM, and leaves it as it found it. Use data-bind-text="expr", which the server can render alongside the text, or compile() if the markup should come from a template.`)}(t,s);let m=0;for(const e of p){null!==e.each&&v(e.el,e.each);for(const t of e.claims)g(e.el,t)}for(const e of u)b(e);function f(e,t,n){if(!1===t.expression)return{ast:null,evaluate:null,deps:new Set};const o={template:`${s} ${n}`,methodCalls:!0===t.methodCalls},i=Qe(e,o);return null===i?null:{ast:i,evaluate:tt(e,o),deps:!1===t.tracks?new Set:nt(i)}}function g(e,t){const{handler:n,kind:s,arg:r,value:l,name:d}=t,c=f(l,n,d);if(null===c)return;const u={id:`apply${m++}_${s}`,kind:s,arg:r,expr:l,ast:c.ast,evaluate:c.evaluate,deps:c.deps,nodes:[e]};h.bindings.push(u),"function"==typeof n.attach&&n.attach({binding:u,node:e,controller:h}),"function"==typeof n.detach&&a.push(()=>n.detach({binding:u,node:e,controller:h})),!0!==n.region?!1!==n.tracks&&k(()=>n.update({binding:u,nodes:[e],context:i,render:o,controller:h})):"if"===s?function(e,t){const n=document.createComment(`dm:if ${t.expr}`);e.parentNode?.insertBefore(n,e),k(()=>{const o=mt(t.evaluate(i));return o&&null===e.parentNode?n.parentNode?.insertBefore(e,n.nextSibling):o||null===e.parentNode||e.parentNode.removeChild(e),!0}),a.push(()=>{null===e.parentNode&&n.parentNode?.insertBefore(e,n.nextSibling),n.parentNode?.removeChild(n)})}(e,u):Wo(`region:${s}`,`"${d}" is a region binding, which needs a compiled template body. applyBindings has none - the markup is the page. Use compile() for ${s}, or data-if / data-each, which are implemented here directly.`)}function v(e,t){const n=So.exec(t);if(null===n||""===n[1].trim())return void Wo(`each:unkeyed:${s}`,`${Eo}="${t}" on ${Ho(e)} needs a key: write ${Eo}="${t.trim()} key=id", naming whichever property identifies an item. Without one there is nothing to reconcile against.`);const r=n[1].trim(),l=n[2],d=f(r,{expression:!0,tracks:!0},Eo);if(null===d)return;const c=e.innerHTML;e.replaceChildren();const u=document.createComment("dm:each"),p=document.createComment("/dm:each");e.append(u,p);const g={id:`apply${m++}_each`,kind:"each",expr:r,keyPath:l,body:c,ast:d.ast,evaluate:d.evaluate,deps:d.deps,factoryBox:{value:null,options:{template:s}},nodes:[{open:u,close:p}]};h.bindings.push(g);const v=xt("each");k(()=>v.update({binding:g,nodes:g.nodes,context:i,render:o,controller:h})),a.push(()=>{bn({open:u},[],ko(g,o),l,i,s),e.replaceChildren()})}function y(e,t){const n=document.createElement("div");for(const t of cn(e.open,e.close))n.appendChild(t);e.body=n.innerHTML;for(const o of t)o!==e&&n.contains(o.open)&&(o.consumed=!0,Wo(`virtual:nested:${s}:${o.kind}`,`\x3c!-- dm ${o.kind}: ${o.expr} --\x3e is inside a virtual list's body, which is compiled as a template - virtual bindings are not read there. Use {{#${o.kind}}} inside the body, or data-if on an element.`))}function b(e){!0!==e.consumed&&("if"===e.kind?function(e){const t=f(e.expr,{expression:!0,tracks:!0},"\x3c!-- dm if --\x3e");if(null===t)return;const n={id:`apply${m++}_if`,kind:"if",expr:e.expr,ast:t.ast,evaluate:t.evaluate,deps:t.deps,nodes:[{open:e.open,close:e.close}]};h.bindings.push(n);let o=null;const s=()=>{null!==o&&(e.close.parentNode?.insertBefore(o,e.close),o=null)};k(()=>{if(mt(n.evaluate(i)))s();else if(null===o){o=document.createDocumentFragment();for(const t of cn(e.open,e.close))o.appendChild(t)}return!0}),a.push(s)}(e):"each"===e.kind?function(e){const t=e.expr.match(So);if(null===t||""===t[1].trim())return void Wo(`virtual:each:unkeyed:${s}`,`\x3c!-- dm each: ${e.expr} --\x3e needs a key: write \x3c!-- dm each: ${e.expr.trim()} key=id --\x3e, naming whichever property identifies an item. Without one there is nothing to reconcile against.`);const n=t[1].trim(),r=t[2],l=f(n,{expression:!0,tracks:!0},"\x3c!-- dm each --\x3e");if(null===l)return;const d={id:`apply${m++}_each`,kind:"each",expr:n,keyPath:r,body:e.body,ast:l.ast,evaluate:l.evaluate,deps:l.deps,factoryBox:{value:null,options:{template:s}},nodes:[{open:e.open,close:e.close}]};h.bindings.push(d);const c=xt("each");k(()=>c.update({binding:d,nodes:d.nodes,context:i,render:o,controller:h})),a.push(()=>{bn({open:e.open,close:e.close},[],ko(d,o),r,i,s)})}(e):"text"===e.kind?function(e){const t=f(e.expr,{expression:!0,tracks:!0},"\x3c!-- dm text --\x3e");if(null===t)return;for(const t of cn(e.open,e.close))t.parentNode?.removeChild(t);const n=document.createTextNode("");e.close.parentNode?.insertBefore(n,e.close);const o={id:`apply${m++}_text`,kind:"text",expr:e.expr,ast:t.ast,evaluate:t.evaluate,deps:t.deps,nodes:[n]};h.bindings.push(o),k(()=>{const e=o.evaluate(i);return n.data=null==e?"":String(e),!0}),a.push(()=>n.parentNode?.removeChild(n))}(e):Wo(`virtual:kind:${e.kind}`,`\x3c!-- dm ${e.kind}: … --\x3e is not a virtual binding. Supported: if, each, text. Anything else needs an element to bind to.`))}function k(e){r.push(ce(e,{label:`${s}:${r.length}`}))}return{get bindings(){return h.bindings.length},context:()=>i,update(e){if(!d){void 0!==e&&(i=Ee(e));for(const e of r)e.recompute()}},dispose(){if(!d){d=!0;for(const e of r)e.dispose();r.length=0;for(const e of a)try{e()}catch(e){console.warn(`${Co} applyBindings teardown threw:`,e)}a.length=0;for(const e of l)Bo.delete(e),e.removeAttribute(jo);l.length=0}}}}function Oo(e,t){for(let n=e.parentNode;n;n=n.parentNode){if(1===n.nodeType&&n.hasAttribute(Eo))return!0;if(n===t)return!1}return!1}const No=(e,t)=>c.isEqual(e,t);class Vo{constructor(e,t={},n={}){this._schema=e,this._initialData={},this._bindings=new Map,this._changeCallbacks=new Set,this._fieldCallbacks=new Map,this._fields=new Map,this._trackedView=null,this._persistKey=n.persist||null,this._autoSave=!1!==n.autoSave;for(const n in e){const o=e[n],s=void 0!==o.default?o.default:null,i=void 0!==t[n]?t[n]:s;this._fields.set(n,ke(i,{equals:No})),this._initialData[n]=i}this._persistKey&&this._loadFromStorage()}get(e){if(e){const t=this._fields.get(e);return t?t.value:void 0}const t={};for(const[e,n]of this._fields)t[e]=n.value;return t}_field(e){let t=this._fields.get(e);return t||(t=ke(null,{equals:No}),this._fields.set(e,t)),t}_snapshot(){const e={};for(const[t,n]of this._fields)e[t]=n.peek();return e}tracked(){if(!this._trackedView){const e=this;this._trackedView=new Proxy({},{get(t,n){if("string"!=typeof n)return;const o=e._fields.get(n);return o?o.value:void 0},set:(t,n,o)=>("string"==typeof n&&e._setField(n,o),!0),has(t,n){if("string"!=typeof n)return!1;const o=e._fields.get(n);return!!o&&(o.value,!0)},ownKeys:()=>[...e._fields.keys()],getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0})})}return this._trackedView}set(e,t){if("object"==typeof e)for(const t in e)this._setField(t,e[t]);else this._setField(e,t);return this}_setField(e,t){const n=this._field(e),o=n.peek();if(this._schema[e]){const n=this._validateField(e,t);if(!n.valid)throw new Error(`Validation failed for ${e}: ${n.error}`)}const s=!No(o,t);n.value=t,s&&(this._notifyChange(e,t,o),this._updateBindings(e,t),this._persistKey&&this._autoSave&&this._saveToStorage())}_validateField(e,t){const n=this._schema[e];if(n.required&&(null==t||""===t))return{valid:!1,error:"Required field is empty"};if(null!=t&&n.type){const e=Ro.types[n.type];if(e&&!e(t))return{valid:!1,error:`Expected type ${n.type}`}}if(void 0!==n.min&&"number"==typeof t&&t<n.min)return{valid:!1,error:`Value must be at least ${n.min}`};if(void 0!==n.max&&"number"==typeof t&&t>n.max)return{valid:!1,error:`Value must be at most ${n.max}`};if(void 0!==n.minLength&&"string"==typeof t&&t.length<n.minLength)return{valid:!1,error:`Length must be at least ${n.minLength}`};if(void 0!==n.maxLength&&"string"==typeof t&&t.length>n.maxLength)return{valid:!1,error:`Length must be at most ${n.maxLength}`};if(n.pattern&&"string"==typeof t&&!n.pattern.test(t))return{valid:!1,error:"Value does not match pattern"};if(n.validate&&"function"==typeof n.validate){const e=n.validate(t);if(!1===e)return{valid:!1,error:"Custom validation failed"};if("string"==typeof e)return{valid:!1,error:e}}return{valid:!0}}validate(){const e=[],t=this._snapshot();for(const n in this._schema){const o=this._validateField(n,t[n]);o.valid||e.push({field:n,error:o.error})}return{valid:0===e.length,errors:e}}toJSON(){return he(()=>this._snapshot())}onChange(e,t){if("string"==typeof e){if("function"!=typeof t)throw new TypeError(`Model.onChange('${e}', callback) requires a callback function`);const n=e,o=e=>{e.field===n&&t(e)};return this._changeCallbacks.add(o),()=>this._changeCallbacks.delete(o)}if("function"!=typeof e)throw new TypeError("Model.onChange expects a callback, or (field, callback)");return this._changeCallbacks.add(e),()=>this._changeCallbacks.delete(e)}onFieldChange(e,t){return this._fieldCallbacks.has(e)||this._fieldCallbacks.set(e,new Set),this._fieldCallbacks.get(e).add(t),()=>this._fieldCallbacks.get(e)?.delete(t)}_notifyChange(e,t,n){for(const o of this._changeCallbacks)o({field:e,newValue:t,oldValue:n,model:this});if(this._fieldCallbacks.has(e))for(const o of this._fieldCallbacks.get(e))o(t,n,this)}_updateBindings(e,t){if(this._bindings.has(e))for(const n of this._bindings.get(e))n.update(t)}_addBinding(e,t){this._bindings.has(e)||this._bindings.set(e,new Set),this._bindings.get(e).add(t)}_removeBinding(e,t){this._bindings.has(e)&&this._bindings.get(e).delete(t)}reset(e=!1){for(const e in this._initialData)this.set(e,c.cloneDeep(this._initialData[e]));return e&&this._persistKey&&this.clearStorage(),this}destroy(e=!1){e&&this._persistKey&&this.clearStorage(),this._changeCallbacks.clear(),this._fieldCallbacks.clear(),this._bindings.clear(),this._fields.clear(),this._trackedView=null}save(){return this._saveToStorage()}load(){return this._loadFromStorage()}clearStorage(){return!!this._persistKey&&J.remove(`model:${this._persistKey}`)}getPersistKey(){return this._persistKey}isPersisted(){return null!==this._persistKey}_saveToStorage(){if(!this._persistKey)return!1;try{return J.set(`model:${this._persistKey}`,this._snapshot())}catch(e){return console.warn("Domma Model: Failed to save to storage",e),!1}}_loadFromStorage(){if(!this._persistKey)return!1;try{const e=J.get(`model:${this._persistKey}`);if(e&&"object"==typeof e){for(const t in e)void 0!==this._schema[t]&&(this._field(t).value=e[t]);return!0}return!1}catch(e){return console.warn("Domma Model: Failed to load from storage",e),!1}}}class Po{constructor(e,t,n,o={}){this.model=e,this.field=t,this.element=n,this.options=o,this.format=o.format||(e=>e),this.parse=o.parse||(e=>e),this.twoWay=o.twoWay||!1,this._eventHandler=null,this.update(e.get(t)),this.twoWay&&this._setupTwoWay()}update(e){const t=this.format(e),n=this.element;"INPUT"===n.tagName||"TEXTAREA"===n.tagName?"checkbox"===n.type?n.checked=Boolean(t):"radio"===n.type?n.checked=n.value===String(t):n.value=null!=t?t:"":"SELECT"===n.tagName?n.value=t:n.textContent=null!=t?t:""}_setupTwoWay(){const e=this.element,t=this._getEventType();this._eventHandler=t=>{let n;n="checkbox"===e.type?e.checked:"number"===e.type||"range"===e.type?""===e.value?null:Number(e.value):e.value;try{this.model.set(this.field,this.parse(n))}catch(e){console.warn("Binding validation error:",e.message)}},e.addEventListener(t,this._eventHandler)}_getEventType(){const e=this.element;return"SELECT"===e.tagName||"checkbox"===e.type||"radio"===e.type?"change":"input"}destroy(){if(this._eventHandler){const e=this._getEventType();this.element.removeEventListener(e,this._eventHandler)}this.model._removeBinding(this.field,this)}}const Ro={_events:new Map,subscribe(e,t){return this._events.has(e)||this._events.set(e,new Set),this._events.get(e).add(t),()=>this.unsubscribe(e,t)},on(e,t){return this.subscribe(e,t)},unsubscribe(e,t){this._events.has(e)&&this._events.get(e).delete(t)},off(e,t){this.unsubscribe(e,t)},publish(e,t){if(this._events.has(e))for(const n of this._events.get(e))n(t)},emit(e,t){this.publish(e,t)},once(e,t){const n=o=>{this.unsubscribe(e,n),t(o)};return this.subscribe(e,n)},clear(e){e?this._events.delete(e):this._events.clear()},create:(e,t={},n={})=>new Vo(e,t,n),extend(...e){const t={};for(const n of e)for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]&&c.isPlainObject(t[e])?t[e]=c.merge(c.cloneDeep(t[e]),c.cloneDeep(n[e])):t[e]=c.cloneDeep(n[e]));return t},pick(e,t){const n={};for(const o of t)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=c.cloneDeep(e[o]));return n},omit(e,t){const n=c.cloneDeep(e);for(const e of t)delete n[e];return n},observable:ke,observableArray:function(e=[],t={}){const n=new ie,o=ye();let s=Array.isArray(e)?e.slice():[];const i=be(t,e=>{n.trigger(),o.notify(e)}),r=()=>i.announce(s),a=e=>{const t=Array.isArray(e)?e.slice():[],n=i.changed(s,t);s=t,n&&r()},l={get value(){return n.track(),s},set value(e){a(e)},get length(){return n.track(),s.length},peek:()=>s,set:e=>a(e),remove:e=>{const t="function"==typeof e?e:t=>t===e;for(let e=s.length-1;e>=0;e--)t(s[e],e)&&s.splice(e,1);return r(),l},removeAll:()=>(s.length=0,r(),l),indexOf:e=>(n.track(),s.indexOf(e)),replace:(e,t)=>{const n=s.indexOf(e);return-1!==n&&(s[n]=t),r(),l},destroy:e=>{const t="function"==typeof e?e:t=>t===e;let n=0,o=0;for(let e=0;e<s.length;e++)t(s[e],e)&&(null!==s[e]&&"object"==typeof s[e]?(s[e]._destroy=!0,n++):o++);return o>0&&console.warn(`${ve} destroy: ${o} matching item(s) are not objects and cannot carry a _destroy mark. Use remove() for an array of primitives.`),(n>0||0===o)&&r(),l},destroyAll:()=>l.destroy(()=>!0),subscribe:e=>o.add(e),extend:e=>(i.extend(e),l)};i.attach(l);for(const e of _e)l[e]=(...t)=>{const n=Array.prototype[e].apply(s,t);return r(),n};return l},computed(e,t={}){const n=de(e,{label:t.label,onNotify:t.onChange||null});return{get value(){return n.get()},set value(e){n.write(e)},get:()=>n.get(),set:e=>n.write(e),peek:()=>he(()=>n.get()),dispose:()=>n.dispose(),_computation:n}},effect(e,t={}){const n=ce(e,{label:t.label});return()=>n.dispose()},untracked:e=>he(e),flush(){oe=!1,le()},types:{string:e=>"string"==typeof e,number:e=>"number"==typeof e&&!Number.isNaN(e),boolean:e=>"boolean"==typeof e,array:e=>Array.isArray(e),object:e=>null!==e&&"object"==typeof e&&!Array.isArray(e),date:e=>e instanceof Date&&!isNaN(e.getTime()),any:()=>!0},bind(e,t,n,o={}){const s="string"==typeof n?document.querySelectorAll(n):[n],i=[];for(const n of s){const s=new Po(e,t,n,o);e._addBinding(t,s),i.push(s)}return()=>{for(const e of i)e.destroy()}},applyBindings(e,t,n={}){const o=function(e){if("string"==typeof e)return document.querySelector(e);if(e&&1===e.nodeType)return e;if(e&&"object"==typeof e){const t=e[0]||(Array.isArray(e.elements)?e.elements[0]:null);if(t&&1===t.nodeType)return t}return null}(t);if(!o)throw new TypeError(`M.applyBindings: no element found for ${"string"==typeof t?`selector "${t}"`:String(t)}`);const{methods:s,...i}=n;return Do(function(e,t){return G(e instanceof Vo?e.tracked():e,{fallback:t})}(e,s),o,{render:(e,t)=>c.render(e,t),...i})},registerBinding:(e,t)=>Mt(e,t),unregisterBinding:e=>function(e){return kt.delete(e)}(e),registerExtender:(e,t)=>fe(e,t),unregisterExtender:e=>function(e){return!me.has(e)&&pe.delete(e)}(e),registerHelper:(e,t)=>ot(e,t),unregisterHelper:e=>function(e){return Be.delete(e)}(e),_stores:new Map,store(e,t={}){if(!this._stores.has(e)){const n={state:{...t},listeners:new Set,getState(){return{...this.state}},setState(e){const t={...this.state};this.state={...this.state,...e};for(const e of this.listeners)e(this.state,t)},subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)},reset(e){this.state=e?{...e}:{...t};for(const e of this.listeners)e(this.state,{})}};this._stores.set(e,n)}return this._stores.get(e)},getStore(e){return this._stores.get(e)},removeStore(e){this._stores.delete(e)}};class Fo{static defaults={layout:"stacked",columns:2,labelPosition:"top",showLabels:!0,showHelperText:!0,showHints:!0,validationMode:"blur",cssFramework:"domma",className:"domma-form",fieldClassName:"domma-form-field",labelClassName:"form-label",inputClassName:"form-input",errorClassName:"form-error",helperClassName:"form-helper-text",hintClassName:"form-hint",cardWrapper:!1};static inputTypes={string:"text",email:"email",password:"password",number:"number",integer:"number",float:"number",boolean:"checkbox",date:"date",datetime:"datetime-local",time:"time",url:"url",tel:"tel",color:"color",range:"range",file:"file",hidden:"hidden",signature:"signature"};constructor(e,t={},n={}){this.schema=e,this.data={...t},this.options={...Fo.defaults,...n},this.model=null,this.errors={},this.touched=new Set,this.utils=window.Domma?.utils||c,this.models=window.Domma?.models||Ro,e&&"object"==typeof e&&(this.model=this.models.create(e,t,{persist:n.persist,autoSave:n.autoSave}))}render(){if(!this.schema)throw new Error("Schema is required to render form");return this._buildForm()}renderTo(e){const t="string"==typeof e?document.querySelector(e):e;if(!t)throw new Error(`Form container not found: ${e}`);return t.innerHTML=this.render(),this.formElement=t.querySelector("form"),this._bindEvents(t),this._initTooltips(t),t}_buildForm(){const{className:e,layout:t,columns:n,cardWrapper:o}=this.options;let s=e;if("grid"===t){s+=` grid ${3===n?"grid-cols-3":"grid-cols-2"} gap-4`}else"inline"===t&&(s+=" domma-form-inline");let i="";if(o&&(i+='<div class="card"><div class="card-body">'),i+=`<form class="${s}" novalidate>`,this.options.sections&&Array.isArray(this.options.sections))for(const e of this.options.sections)i+=this._buildSection(e);else for(const e in this.schema)i+=this._buildField(e,this.schema[e]);if(!1!==this.options.showSubmitButton){const e=this.options.submitText||"Submit",t=this.options.resetText,n=this.options.buttonAlignment||"right";i+=`<div class="form-group form-buttons mt-4 ${"left"===n?"text-left":"center"===n?"text-center":"text-right"}">`,t&&(i+=`<button type="button" class="btn btn-secondary mr-2" data-action="reset">${this.utils.escapeHtml(t)}</button>`),i+=`<button type="submit" class="btn btn-primary">${this.utils.escapeHtml(e)}</button>`,i+="</div>"}return i+="</form>",o&&(i+="</div></div>"),i}_buildSection(e){let t="";e.title&&(t+='<fieldset class="domma-form-section">',t+=`<legend class="domma-form-section-title">${this.utils.escapeHtml(e.title)}</legend>`);t+=`<div class="${"grid"===e.layout?`grid grid-cols-${e.columns||2}`:"domma-form-section-content"}">`;for(const n of e.fields||[])this.schema[n]&&(t+=this._buildField(n,this.schema[n]));return t+="</div>",e.title&&(t+="</fieldset>"),t}_buildField(e,t){const{fieldClassName:n,showLabels:o,showHelperText:s,showHints:i,labelPosition:r}=this.options,a=t.formConfig||{},l=t.type||"string",d=t.label||this.utils.capitalize(e),c=this.data[e]||t.default||"",h=t.required||!1,u=a.disabled||t.readonly||!1,p=a.placeholder||"",m=a.hint||"",f=a.helperText||"",g=a.tooltip||"",v=a.span||1;let y="";if("grid"===this.options.layout&&v>1){const e=this.options.columns||2;2===v?y=" col-span-2":3===v&&3===e?y=" col-span-3":v>=e&&(y=3===e?" col-span-3":" col-span-2")}let b=`<div class="${n}${y}" data-field="${e}">`;if(o&&d&&"hidden"!==l&&"boolean"!==l&&"checkbox"!==l){const t=this.options.labelClassName,n=h?' <span class="text-danger">*</span>':"",o=g?` data-tooltip="${this.utils.escapeHtml(g)}"`:"",s=g?" has-tooltip":"";b+=`<label for="field-${this.utils.escapeHtml(e)}" class="${t}${s}"${o}>`,b+=`${this.utils.escapeHtml(d)}${n}`,g&&(b+=' <span class="tooltip-icon" data-icon="help-circle" style="display: inline-block; vertical-align: middle; opacity: 0.6; cursor: help;"></span>'),i&&m&&(b+=` <small class="${this.options.hintClassName}">${this.utils.escapeHtml(m)}</small>`),b+="</label>"}return b+=this._buildInput(e,t,{type:l,value:c,required:h,disabled:u,placeholder:p}),s&&f&&(b+=`<small class="${this.options.helperClassName}">${f}</small>`),b+=`<div class="${this.options.errorClassName}" data-error-for="${e}" style="display: none;"></div>`,b+="</div>",b}_buildInput(e,t,n){const{type:o,value:s,required:i,disabled:r,placeholder:a}=n,l=t.formConfig||{},d=`field-${e}`,c={id:d,name:e,class:this.options.inputClassName,...i&&{required:!0},...r&&{disabled:!0},...a&&{placeholder:a},...void 0!==t.min&&{min:t.min},...void 0!==t.max&&{max:t.max},...t.pattern&&{pattern:t.pattern},...l.autocomplete&&{autocomplete:l.autocomplete}},h=Object.entries(c).map(([e,t])=>!0===t?e:`${e}="${t}"`).join(" ");switch(o){case"select":return this._buildSelect(e,t,c,s);case"multiselect":return c.multiple=!0,this._buildSelect(e,t,c,s);case"textarea":return`<textarea ${h} rows="${l.rows||3}">${this.utils.escapeHtml(s)}</textarea>`;case"radio":return this._buildRadioGroup(e,t,c,s);case"checkbox-group":return this._buildCheckboxGroup(e,t,c,s);case"chooser":return this._buildChooser(e,t,c,s);case"checkbox":case"boolean":const n=s?"checked":"",i=t.label||this.utils.capitalize(e),r=t.required?' <span class="text-danger">*</span>':"",a=l.hint?` <small class="form-text text-muted">${l.hint}</small>`:"";return`<div class="form-check">\n <input type="checkbox" class="form-check-input" ${h} ${n}>\n <label class="form-check-label" for="${c.id}">${i}${r}</label>\n ${a}\n </div>`;case"file":return`<input type="file" ${h} accept="${l.accept||""}" ${l.multiple?"multiple":""}>`;case"signature":return`<div class="domma-signature-field" id="${d}" data-signature-field="${e}"></div>`;default:const u=`<input type="${Fo.inputTypes[o]||"text"}" ${h} value="${this.utils.escapeHtml(s)}">`,p=this._buildAddon(l.prefix,"left"),m=this._buildAddon(l.suffix,"right");if(!p&&!m)return u;return`<div class="${["input-group-icon",p&&"has-addon-left",m&&"has-addon-right"].filter(Boolean).join(" ")}">${p}${u}${m}</div>`}}_buildAddon(e,t){if(!e||"object"!=typeof e)return"";const n=`input-group-addon input-group-addon-${t}`;let o="";return e.icon&&/^[a-z0-9-]+$/i.test(e.icon)?o=`<span data-icon="${e.icon}"></span>`:void 0!==e.text&&null!==e.text?o=this.utils.escapeHtml(String(e.text)):"string"==typeof e.html&&(o=e.html),o?`<span class="${n}">${o}</span>`:""}_buildSelect(e,t,n,o){let s=`<select ${Object.entries(n).map(([e,t])=>!0===t?e:`${e}="${t}"`).join(" ")}>`;t.required||(s+='<option value="">-- Select --</option>');const i=t.options||[],r=Array.isArray(o)?o:[o];for(const e of i)if("string"==typeof e){s+=`<option value="${e}" ${r.includes(e)?"selected":""}>${this.utils.capitalize(e)}</option>`}else if("object"==typeof e){const t=r.includes(e.value)?"selected":"";s+=`<option value="${e.value}" ${t}>${e.label}</option>`}return s+="</select>",s}_buildRadioGroup(e,t,n,o){const s=t.options||[];let i='<div class="domma-radio-group" role="radiogroup">';for(const t of s){const s="string"==typeof t?t:t.value,r="string"==typeof t?this.utils.capitalize(t):t.label,a=`${n.id}-${s}`;i+=`\n <label class="domma-radio-option" for="${a}">\n <input type="radio" class="form-check-input" id="${a}" name="${e}" value="${s}" ${s===o?"checked":""} ${n.disabled?"disabled":""}>\n <span class="form-check-label">${r}</span>\n </label>\n `}return i+="</div>",i}_buildCheckboxGroup(e,t,n,o){const s=t.options||[],i=Array.isArray(o)?o:[];let r='<div class="domma-checkbox-group">';for(const t of s){const o="string"==typeof t?t:t.value,s="string"==typeof t?this.utils.capitalize(t):t.label,a=`${n.id}-${o}`;r+=`\n <label class="domma-checkbox-option" for="${a}">\n <input type="checkbox" class="form-check-input" id="${a}" name="${e}[]" value="${o}" ${i.includes(o)?"checked":""} ${n.disabled?"disabled":""}>\n <span class="form-check-label">${s}</span>\n </label>\n `}return r+="</div>",r}_buildChooser(e,t,n,o){const s={variant:t.variant||"card",multiple:!!t.multiple,density:t.density||"comfortable",columns:t.columns||3,accent:t.accent||"primary",accentStyle:t.accentStyle||"border",glow:!!t.glow,glowColour:t.glowColour||null,shadow:t.shadow||"none",shadowColour:t.shadowColour||null,options:t.options||[],value:void 0!==o?o:t.multiple?[]:null,name:e,required:!!t.required},i=JSON.stringify(s).replace(/"/g,"&quot;");return`<div class="domma-chooser-field" id="${n.id}" data-chooser-field="${e}" data-chooser-config="${i}"></div>`}_bindEvents(e){e.addEventListener("submit",e=>{e.preventDefault(),this.handleSubmit()}),e.addEventListener("blur",e=>{e.target.matches("input, select, textarea")&&(this.validateField(e.target.name),this.touched.add(e.target.name))},!0),e.addEventListener("change",e=>{if(e.target.matches("input, select, textarea")&&this.model){const t=this._getFieldValue(e.target);try{this.model.set(e.target.name,t)}catch(t){this.setFieldError(e.target.name,t.message)}}}),e.addEventListener("click",e=>{e.target.matches('[data-action="reset"]')&&(e.preventDefault(),this.reset())}),this._initSignatureFields(e),this._initChooserFields(e)}_initChooserFields(e){this._choosers||(this._choosers={});const t=e.querySelectorAll("[data-chooser-field]");if(!t.length)return;const n="function"==typeof Y?.chooser?Y.chooser.bind(Y):window.Domma?.elements?.chooser?.bind(window.Domma.elements);n&&t.forEach(e=>{const t=JSON.parse((e.getAttribute("data-chooser-config")||"{}").replace(/&quot;/g,'"')),o=e.getAttribute("data-chooser-field"),s=n(e,{...t,onChange:e=>{if(this.model)try{this.model.set(o,e)}catch(e){this.setFieldError(o,e.message)}else this.data[o]=e}});s&&(this._choosers[o]=s)})}_initSignatureFields(e){const t=e.querySelectorAll("[data-signature-field]");t.length&&window.Domma&&"function"==typeof window.Domma.elements?.signature&&t.forEach(e=>{const t=e.dataset.signatureField;window.Domma.elements.signature(e,{name:t,onChange:e=>{this.model&&this.model.set({[t]:e})}})})}_initTooltips(e){if(window.Domma&&window.Domma.icons&&"function"==typeof window.Domma.icons.scan&&window.Domma.icons.scan(e),window.Domma&&window.Domma.elements&&"function"==typeof window.Domma.elements.tooltip){e.querySelectorAll("label[data-tooltip]").forEach(e=>{window.Domma.elements.tooltip(e,{position:"top",trigger:"hover",delay:{show:200,hide:0}})})}}getData(){return this.model?this.model.get():this.data}setData(e){this.data={...this.data,...e},this.model&&this.model.set(e)}validate(){this.errors={};let e=!0;for(const t in this.schema){this.validateField(t)||(e=!1)}return e}validateField(e){const t=this.schema[e];if(!t)return!0;const n=this._getFieldValueByName(e);try{const o=this._validateFieldValue(e,n,t);if(!o.valid)return this.setFieldError(e,o.error),!1;if(this.model&&this.model._validateField){const t=this.model._validateField(e,n);if(!t.valid)return this.setFieldError(e,t.error),!1}return this.clearFieldError(e),!0}catch(t){return this.setFieldError(e,t.message),!1}}setFieldError(e,t){this.errors[e]=t;const n=document.querySelector(`[data-error-for="${e}"]`);n&&(n.textContent=t,n.style.display="block",n.parentElement.classList.add("has-error"))}clearFieldError(e){delete this.errors[e];const t=document.querySelector(`[data-error-for="${e}"]`);t&&(t.textContent="",t.style.display="none",t.parentElement.classList.remove("has-error"))}handleSubmit(){const e=this.validate(),t=this.getData();return e&&this.options.onSubmit?this.options.onSubmit(t,this):!e&&this.options.onValidationError&&this.options.onValidationError(this.errors,this),{isValid:e,data:t,errors:this.errors}}_getFieldValue(e){const{type:t,name:n}=e;if("checkbox"===t){if(n.endsWith("[]")){const e=document.querySelectorAll(`input[name="${n}"]:checked`);return Array.from(e).map(e=>e.value)}return e.checked}if("radio"===t){const e=document.querySelector(`input[name="${n}"]:checked`);return e?e.value:null}return"number"===t||"range"===t?""===e.value?null:Number(e.value):e.value}_getFieldValueByName(e){if(this._choosers&&this._choosers[e])return this._choosers[e].getValue();if(this.formElement){const t=this.formElement.querySelector(`[name="${e}"]`);if(t)return this._getFieldValue(t)}return this.model?this.model.get(e):this.data[e]}_validateFieldValue(e,t,n){const o="chooser"===n.type?null==t||Array.isArray(t)&&0===t.length||""===t:null==t||""===t;if(n.required&&o)return{valid:!1,error:`${n.label||e} is required`};if(o)return{valid:!0};if("email"===n.type&&t){if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t))return{valid:!1,error:"Please enter a valid email address"}}if("number"===n.type&&null!==t){const e=Number(t);if(isNaN(e))return{valid:!1,error:"Please enter a valid number"};if(void 0!==n.min&&e<n.min)return{valid:!1,error:`Value must be at least ${n.min}`};if(void 0!==n.max&&e>n.max)return{valid:!1,error:`Value must be no more than ${n.max}`}}if("string"==typeof t){if(n.minLength&&t.length<n.minLength)return{valid:!1,error:`Must be at least ${n.minLength} characters`};if(n.maxLength&&t.length>n.maxLength)return{valid:!1,error:`Must be no more than ${n.maxLength} characters`}}if(n.pattern&&"string"==typeof t&&!n.pattern.test(t))return{valid:!1,error:n.formConfig?.hint||"Invalid format"};if(n.validate&&"function"==typeof n.validate)try{const e=this.formElement?function(e){const t=new FormData(e),n={};for(const[e,o]of t.entries())n[e]?Array.isArray(n[e])?n[e].push(o):n[e]=[n[e],o]:n[e]=o;return e.querySelectorAll("input").forEach(e=>{"checkbox"!==e.type||e.checked?"checkbox"===e.type&&e.checked&&(n[e.name]="on"===e.value||e.value):n.hasOwnProperty(e.name)||(n[e.name]=!1)}),n}(this.formElement):this.data,o=n.validate(t,e);if(!0!==o)return{valid:!1,error:o||"Validation failed"}}catch(e){return{valid:!1,error:e.message||"Validation error"}}return{valid:!0}}}const qo={create:(e,t={},n={})=>new Fo(e,t,n),render:(e,t,n={},o={})=>new Fo(t,n,o).renderTo(e),wizard(e,t={}){if(!t.schema)throw new Error("Wizard options must include a schema with steps array");const{schema:{steps:n=[]},data:o={},...s}=t,i=`wizard-${Date.now()}`;let r=0,a={...o},l=null;const d="string"==typeof e?document.querySelector(e):e;if(!d)throw new Error(`Wizard target element not found: ${e}`);if(!Array.isArray(n)||0===n.length)throw new Error("Wizard schema must contain a non-empty steps array");function c(e){const t={};return e.querySelectorAll("input, select, textarea").forEach(e=>{const{name:n,type:o,value:s,checked:i}=e;if(n)if("checkbox"===o)if(n.endsWith("[]")){const e=n.slice(0,-2);t[e]||(t[e]=[]),i&&t[e].push(s)}else t[n]=i;else"radio"===o?i&&(t[n]=s):"number"===o||"range"===o?t[n]=""===s?null:Number(s):"SELECT"===e.tagName&&e.hasAttribute("multiple")?t[n]=Array.from(e.selectedOptions).map(e=>e.value).filter(e=>e):t[n]=s}),t}function h(){if(d.innerHTML=function(e){const t=n[e],o=new Fo(t.fields,a,{...s,layout:t.layout||s.layout||"stacked",showSubmitButton:!1}),r=0===e,l=e===n.length-1;return`\n <div id="${i}" class="wizard">\n <div class="wizard-step active card" data-step="${e}">\n <div class="card-header wizard-header">\n <div class="wizard-progress mb-3">\n <div class="wizard-progress-bar" style="width: ${(e+1)/n.length*100}%"></div>\n </div>\n <div class="wizard-step-info">\n <h5 class="wizard-step-title card-title mb-2">${t.title}</h5>\n ${t.description?`<p class="wizard-step-description card-subtitle text-muted mb-2">${t.description}</p>`:""}\n <small class="text-muted">Step ${e+1} of ${n.length}</small>\n </div>\n </div>\n <div class="card-body wizard-content">\n ${o.render()}\n </div>\n <div class="card-footer wizard-nav d-flex justify-content-between">\n <button type="button" class="btn btn-secondary wizard-prev" ${r?'style="visibility: hidden;"':""}>\n ${s.prevText||"Previous"}\n </button>\n <button type="button" class="btn btn-primary wizard-${l?"submit":"next"}">\n ${l?s.finishText||"Finish":s.nextText||"Next"}\n </button>\n </div>\n </div>\n </div>\n `}(r),l=d.querySelector(`#${i}`),!l)return;const e=l.querySelector("form");if(e){new Fo(n[r].fields,a,{...s,showSubmitButton:!1})._bindEvents(e)}const t=l.querySelector(".wizard-prev"),o=l.querySelector(".wizard-next"),u=l.querySelector(".wizard-submit");t&&t.addEventListener("click",e=>{e.preventDefault(),r>0&&(s.onStepChange&&s.onStepChange(r-1,a),r--,h())}),o&&o.addEventListener("click",t=>{t.preventDefault();const o=c(e);Object.assign(a,o);const i=new Fo(n[r].fields,a,{...s,showSubmitButton:!1});i.formElement=e,i.setData(a);const l=i.validate();s.onValidation&&s.onValidation(l,i.errors||[],r),l&&r<n.length-1&&(s.onStepChange&&s.onStepChange(r+1,a),r++,h())}),u&&u.addEventListener("click",async t=>{t.preventDefault();const o=c(e);Object.assign(a,o);const i=new Fo(n[r].fields,a,{...s,showSubmitButton:!1});i.formElement=e,i.setData(a);const l=i.validate();if(s.onValidation&&s.onValidation(l,i.errors||[],r),l&&s.onSubmit)try{await s.onSubmit(a,i)}catch(e){s.onError&&s.onError(e,a,i)}})}return n.forEach((e,t)=>{if(e.title||(e.title=`Step ${t+1}`),!e.fields)throw new Error(`Step ${t} is missing fields array`)}),h(),{nextStep:()=>{r<n.length-1&&(s.onStepChange&&s.onStepChange(r+1,a),r++,h())},prevStep:()=>{r>0&&(s.onStepChange&&s.onStepChange(r-1,a),r--,h())},goToStep:e=>{e>=0&&e<n.length&&(s.onStepChange&&s.onStepChange(e,a),r=e,h())},getCurrentStep:()=>r,getStepData:()=>({...a}),setStepData:e=>{Object.assign(a,e),h()},validate:()=>{const e=l?.querySelector("form");if(e){const t=new Fo(n[r].fields,a,{...s,showSubmitButton:!1});return t.formElement=e,t.setData(a),t.validate()}return!0},getElement:()=>l}},modal(e,t={},n={}){const o=`form-${Date.now()}`;let s=null;const i=new Fo(e,t,{...n,showSubmitButton:!1,onSubmit:async(e,t)=>{if(n.onSave)try{await n.onSave(e,t),!1!==n.closeOnSave&&s&&s.close()}catch(o){n.onError&&n.onError(o,e,t)}}}),r=`\n <div class="modal" id="modal-${o}" style="display: none;">\n <div class="modal-header">\n <h3 class="modal-title">${n.title||"Form"}</h3>\n <button type="button" class="modal-close" data-action="close">&times;</button>\n </div>\n <div class="modal-body">\n ${i.render()}\n </div>\n <div class="modal-footer">\n <button type="button" class="btn btn-secondary" data-action="close">Cancel</button>\n <button type="button" class="btn btn-primary" data-action="save">${n.saveText||"Save"}</button>\n </div>\n </div>\n `,a=document.createElement("div");a.className="modal-backdrop",a.style.display="none";const l=document.createElement("div");l.innerHTML=r;const d=l.firstElementChild;return document.body.appendChild(a),document.body.appendChild(d),s={open(){a.style.display="block",d.style.display="block",setTimeout(()=>{a.classList.add("active"),d.classList.add("active")},10);const e=d.querySelector("form");e&&i._bindEvents(e),d.querySelectorAll('[data-action="close"]').forEach(e=>{e.addEventListener("click",()=>this.close())}),d.querySelector('[data-action="save"]').addEventListener("click",()=>{const e=d.querySelector("form");if(e){const t=new Event("submit",{cancelable:!0});e.dispatchEvent(t)}}),a.addEventListener("click",e=>{e.target===a&&this.close()})},close(){a.classList.remove("active"),d.classList.remove("active"),setTimeout(()=>{a.style.display="none",d.style.display="none",document.body.removeChild(a),document.body.removeChild(d)},300)},isOpen:()=>"none"!==d.style.display},s},crud(e){if(!e.schema)throw new Error("CRUD config must include a schema");if(!e.endpoint)throw new Error("CRUD config must include an API endpoint");const{schema:t,endpoint:n,tableSelector:o,title:s="Manage Items",primaryKey:i="id",displayField:r="name",headers:a={},onError:l=e=>console.error("CRUD Error:",e),onSuccess:d=e=>console.log("CRUD Success:",e)}=e;let h=null,u=[];return{async init(){await this.loadData(),this.createTable(),this.bindEvents()},async loadData(){try{window.Domma?.auth?.getApiUrl?.();const e=window.Domma?.auth?.token,t=e?{Authorization:`Bearer ${e}`}:{},o=await window.Domma.http.get(n,{headers:{...a,...t}});if(!o.success)throw new Error(o.message||"Failed to load data");u=o.data||[]}catch(e){throw l(e),e}},createTable(){if(!o)return;const e=Object.entries(t).map(([e,t])=>({key:e,title:t.label||(window.Domma?.utils||c).capitalize(e),sortable:!0,render:t.tableRender}));e.push({key:"actions",title:"Actions",sortable:!1,render:(e,t)=>{const n=window.Domma.icons.html("edit",{size:16,class:"inline-icon",colour:"var(--dm-info-light, #a5d8ff)",attrs:{style:"margin-right: 4px;"}}),o=window.Domma.icons.html("trash",{size:16,class:"inline-icon",colour:"var(--dm-danger-light, #ffacac)",attrs:{style:"margin-right: 4px;"}});return`\n <div class="btn-group btn-group-sm">\n <button class="btn btn-primary crud-edit-btn" data-id="${t[i]}">\n ${n}\n Edit\n </button>\n <button class="btn btn-danger crud-delete-btn" data-id="${t[i]}">\n ${o}\n Delete\n </button>\n </div>\n `}}),h=window.Domma.tables.create(o,{data:u,columns:e,pagination:!0,pageSize:25,striped:!0,selectable:!0,selectionMode:"multiple",exportPanel:!0,exportOptions:["text","csv","excel","json"],columnToggle:!0,regexSearch:!0,persistSettings:!0,storageKey:`domma-crud-${s.toLowerCase().replace(/\s+/g,"-")}`}),this.initializeTableIcons()},initializeTableIcons(){setTimeout(()=>{document.querySelectorAll("[data-icon]").forEach(e=>{const t=e.getAttribute("data-icon");if(window.Domma&&window.Domma.icons&&window.Domma.icons.render){const n=window.Domma.icons.render(t,{size:16,class:"inline-icon"});n&&(e.innerHTML="",e.appendChild(n))}})},100)},bindEvents(){const e=document.querySelector(".crud-add-btn");e&&e.addEventListener("click",()=>this.create()),document.addEventListener("click",e=>{if(e.target.matches(".crud-edit-btn")){const t=e.target.getAttribute("data-id");this.edit(t)}}),document.addEventListener("click",e=>{if(e.target.matches(".crud-delete-btn")){const t=e.target.getAttribute("data-id");this.delete(t)}});const t=document.querySelector(".crud-refresh-btn");t&&t.addEventListener("click",()=>this.refresh())},async create(){qo.modal(t,{},{title:`Create New ${s.slice(7)}`,size:"xl",saveText:"Create",showSubmitButton:!1,onSave:async e=>{try{window.Domma?.auth?.getApiUrl?.();const t=window.Domma?.auth?.token,o=t?{Authorization:`Bearer ${t}`}:{},s=await window.Domma.http.post(n,e,{headers:{...a,...o}});if(!s.success)throw new Error(s.message||"Failed to create item");d("Item created successfully"),await this.refresh()}catch(e){throw l(e),e}}}).open()},async edit(e){const o=u.find(t=>t[i]==e);if(!o)return void l(new Error("Item not found"));qo.modal(t,o,{title:`Edit ${o[r]||"Item"}`,size:"xl",saveText:"Update",showSubmitButton:!1,onSave:async t=>{try{window.Domma?.auth?.getApiUrl?.();const o=window.Domma?.auth?.token,s=o?{Authorization:`Bearer ${o}`}:{},i=await window.Domma.http.put(`${n}/${e}`,t,{headers:{...a,...s}});if(!i.success)throw new Error(i.message||"Failed to update item");d("Item updated successfully"),await this.refresh()}catch(e){throw l(e),e}}}).open()},async delete(e){const t=u.find(t=>t[i]==e);if(!t)return void l(new Error("Item not found"));if(await window.Domma.elements.confirm(`Are you sure you want to delete "${t[r]||"this item"}"?\n\nThis action cannot be undone.`,{title:"Confirm Delete",confirmText:"Delete",cancelText:"Cancel",type:"warning"}))try{window.Domma?.auth?.getApiUrl?.();const t=window.Domma?.auth?.token,o=t?{Authorization:`Bearer ${t}`}:{},s=await window.Domma.http.delete(`${n}/${e}`,{headers:{...a,...o}});if(!s.success)throw new Error(s.message||"Failed to delete item");d("Item deleted successfully"),await this.refresh()}catch(e){l(e)}},async refresh(){try{await this.loadData(),h&&(h.setData(u),this.initializeTableIcons())}catch(e){}},getData:()=>[...u],getTable:()=>h,addItem:e=>{u.push(e),h&&h.setData(u)},updateItem:(e,t)=>{const n=u.findIndex(t=>t[i]==e);-1!==n&&(u[n]={...u[n],...t},h&&h.setData(u))},removeItem:e=>{const t=u.findIndex(t=>t[i]==e);-1!==t&&(u.splice(t,1),h&&h.setData(u))}}}};function Uo(e,t){let n;if("string"==typeof e)n=Array.from(document.querySelectorAll(e));else if(e instanceof Element)n=[e];else{if(!(e instanceof NodeList||Array.isArray(e)))return console.error(`[Domma.effects.${t}] Invalid selector`),null;n=Array.from(e)}return 0===n.length?(console.warn(`[Domma.effects.${t}] No elements found`),null):n}function Ko(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}const Yo={club:{origins:["tl","tr","bl","br"],motion:"sweep",sweepArc:100,speed:1,beamWidth:16,flicker:!0,hz:10,colours:["#ffffff","#38bdf8","#f472b6","#a855f7"],intensity:.7},concert:{origins:["tl","tr"],motion:"sweep",sweepArc:120,speed:.8,beamWidth:18,flicker:!0,hz:6,colours:["#f43f5e","#fb923c","#facc15","#22c55e","#3b82f6"],intensity:.75},police:{origins:["tl","tr"],motion:"sweep",sweepArc:70,speed:2.2,beamWidth:22,flicker:!0,hz:8,colours:["#ef4444","#3b82f6"],intensity:.85},searchlight:{origins:["bl","br"],motion:"rotate",sweepArc:90,speed:.5,beamWidth:12,flicker:!1,hz:0,colours:["#fffbe6","#fde68a"],intensity:.6},scanner:{origins:["tl","tr","bl","br"],motion:"sweep",sweepArc:60,speed:1.6,beamWidth:8,flicker:!1,hz:0,colours:["#22d3ee"],intensity:.7},mood:{origins:["tl","tr","bl","br"],motion:"sweep",sweepArc:140,speed:.35,beamWidth:28,flicker:!1,hz:0,colours:["#a855f7","#6366f1","#ec4899","#38bdf8"],intensity:.45}};function Jo(e,t){let n=String(e).replace("#","");3===n.length&&(n=n.split("").map(e=>e+e).join(""));return`rgba(${parseInt(n.slice(0,2),16)}, ${parseInt(n.slice(2,4),16)}, ${parseInt(n.slice(4,6),16)}, ${t})`}const Go={rainbow:["#ef4444","#f97316","#facc15","#22c55e","#0ea5e9","#6366f1","#a855f7","#ec4899"],festive:["#dc2626","#16a34a","#fbbf24","#3b82f6","#a855f7","#ec4899"],gold:["#fbbf24","#f59e0b","#fde68a","#fffbeb","#d97706","#fcd34d"],silver:["#e5e7eb","#cbd5e1","#94a3b8","#f8fafc","#9ca3af","#d1d5db"],pastel:["#fbcfe8","#bae6fd","#bbf7d0","#fef3c7","#ddd6fe","#fed7aa"],mono:["#1f2937","#4b5563","#9ca3af","#d1d5db","#f3f4f6"],sunset:["#f43f5e","#fb923c","#facc15","#f59e0b","#ec4899"],ocean:["#0ea5e9","#22d3ee","#06b6d4","#3b82f6","#6366f1"],forest:["#16a34a","#65a30d","#84cc16","#22c55e","#15803d"],bridal:["#ffffff","#fef3c7","#fce7f3","#fbcfe8","#f9a8d4"],meadow:["#84cc16","#a3e635","#bbf7d0","#bae6fd","#fef08a","#ddd6fe"],firefly:["#fde68a","#facc15","#f59e0b","#a3e635","#fef9c3"],aqua:["#a5f3fc","#67e8f9","#22d3ee","#bae6fd","#e0f2fe"],autumn:["#b45309","#d97706","#f59e0b","#ca8a04","#92400e","#dc2626"]};function Xo(e){if(Array.isArray(e)&&e.length>0)return e;if("string"==typeof e&&Go[e])return Go[e];if("theme"===e||!e){const e=document.documentElement,t=getComputedStyle(e),n=["--dm-primary","--dm-secondary","--dm-success","--dm-warning","--dm-danger","--dm-info"].map(e=>t.getPropertyValue(e).trim()).filter(e=>e&&"transparent"!==e);return n.length>0?n:Go.rainbow}return console.warn(`[Domma.effects] Unknown palette '${e}', using rainbow.`),Go.rainbow}const Zo=Xo;var Qo={breathe:function(e,t={}){const n={amplitude:6,duration:3e3,easing:"ease-in-out",delay:0,stagger:0,iterations:"infinite",pauseOnHover:!1,autoStart:!0,respectMotionPreference:!0,onStart:null,onComplete:null,...t};let o;if("string"==typeof e)o=document.querySelectorAll(e);else if(e instanceof Element)o=[e];else{if(!(e instanceof NodeList||Array.isArray(e)))return console.error("[Domma.effects.breathe] Invalid selector"),null;o=Array.from(e)}if(0===o.length)return console.warn("[Domma.effects.breathe] No elements found"),null;if(n.respectMotionPreference&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)return console.log("[Domma.effects.breathe] Disabled due to prefers-reduced-motion"),{pause:()=>{},resume:()=>{},stop:()=>{},restart:()=>{},destroy:()=>{},isRunning:()=>!1,isPaused:()=>!1};const s=`domma-breathe-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,i=`\n @keyframes ${s} {\n 0%, 100% {\n transform: translateY(0);\n }\n 50% {\n transform: translateY(-${n.amplitude}px);\n }\n }\n `,r=document.createElement("style");r.setAttribute("data-domma-effect",s),r.textContent=i,document.head.appendChild(r);const a=new Map;return o.forEach((e,t)=>{const o=n.delay+t*n.stagger;if(e.style.animation=`${s} ${n.duration}ms ${n.easing} ${o}ms ${n.iterations}`,n.pauseOnHover){const t=()=>{e.style.animationPlayState="paused"},n=()=>{e.style.animationPlayState="running"};e.addEventListener("mouseenter",t),e.addEventListener("mouseleave",n),a.set(e,{mouseEnterHandler:t,mouseLeaveHandler:n})}if(n.onComplete&&"infinite"!==n.iterations){const t=()=>{n.onComplete(),e.removeEventListener("animationend",t)};e.addEventListener("animationend",t)}}),n.onStart&&n.onStart(),{pause(){o.forEach(e=>{e.style.animationPlayState="paused"})},resume(){o.forEach(e=>{e.style.animationPlayState="running"})},stop(){o.forEach(e=>{e.style.animation="none"})},restart(){o.forEach((e,t)=>{const o=n.delay+t*n.stagger;e.style.animation="none",e.offsetHeight,e.style.animation=`${s} ${n.duration}ms ${n.easing} ${o}ms ${n.iterations}`})},destroy(){o.forEach(e=>{if(e.style.animation="none",a.has(e)){const t=a.get(e);e.removeEventListener("mouseenter",t.mouseEnterHandler),e.removeEventListener("mouseleave",t.mouseLeaveHandler),a.delete(e)}}),r.remove()},isRunning(){if(0===o.length)return!1;const e=o[0];return"paused"!==e.style.animationPlayState&&"none"!==e.style.animation},isPaused:()=>0!==o.length&&"paused"===o[0].style.animationPlayState}},pulse:function(e,t={}){const n={scale:1.05,duration:2e3,easing:"ease-in-out",delay:0,stagger:0,iterations:"infinite",pauseOnHover:!1,respectMotionPreference:!0,...t};let o;if("string"==typeof e)o=document.querySelectorAll(e);else if(e instanceof Element)o=[e];else{if(!(e instanceof NodeList||Array.isArray(e)))return console.error("[Domma.effects.pulse] Invalid selector"),null;o=Array.from(e)}if(0===o.length)return console.warn("[Domma.effects.pulse] No elements found"),null;if(n.respectMotionPreference&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)return{pause:()=>{},resume:()=>{},stop:()=>{},restart:()=>{},destroy:()=>{},isRunning:()=>!1,isPaused:()=>!1};const s=`domma-pulse-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,i=`\n @keyframes ${s} {\n 0%, 100% {\n transform: scale(1);\n }\n 50% {\n transform: scale(${n.scale});\n }\n }\n `,r=document.createElement("style");r.setAttribute("data-domma-effect",s),r.textContent=i,document.head.appendChild(r);const a=new Map;return o.forEach((e,t)=>{const o=n.delay+t*n.stagger;if(e.style.animation=`${s} ${n.duration}ms ${n.easing} ${o}ms ${n.iterations}`,n.pauseOnHover){const t=()=>e.style.animationPlayState="paused",n=()=>e.style.animationPlayState="running";e.addEventListener("mouseenter",t),e.addEventListener("mouseleave",n),a.set(e,{mouseEnterHandler:t,mouseLeaveHandler:n})}}),{pause(){o.forEach(e=>e.style.animationPlayState="paused")},resume(){o.forEach(e=>e.style.animationPlayState="running")},stop(){o.forEach(e=>e.style.animation="none")},restart(){o.forEach((e,t)=>{const o=n.delay+t*n.stagger;e.style.animation="none",e.offsetHeight,e.style.animation=`${s} ${n.duration}ms ${n.easing} ${o}ms ${n.iterations}`})},destroy(){o.forEach(e=>{if(e.style.animation="none",a.has(e)){const t=a.get(e);e.removeEventListener("mouseenter",t.mouseEnterHandler),e.removeEventListener("mouseleave",t.mouseLeaveHandler),a.delete(e)}}),r.remove()},isRunning:()=>o.length>0&&"paused"!==o[0].style.animationPlayState&&"none"!==o[0].style.animation,isPaused:()=>o.length>0&&"paused"===o[0].style.animationPlayState}},scribe:function(e,t={}){const n={mode:"typewriter",speed:50,deleteSpeed:30,cursor:!0,cursorChar:"|",cursorBlink:!0,cursorType:"caret",loop:!1,loopDelay:1e3,pauseOnHover:!1,autoStart:!0,respectMotionPreference:!0,actions:[],onStart:null,onComplete:null,onCharacter:null,onRender:null,onUndoRender:null,onLoop:null,...t};let o;if("string"==typeof e)o=Array.from(document.querySelectorAll(e));else if(e instanceof Element)o=[e];else{if(!(e instanceof NodeList||Array.isArray(e)))return console.error("[Domma.effects.scribe] Invalid selector"),null;o=Array.from(e)}if(0===o.length)return console.warn("[Domma.effects.scribe] No elements found"),null;if(n.respectMotionPreference&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)return console.log("[Domma.effects.scribe] Disabled due to prefers-reduced-motion"),{pause:()=>{},resume:()=>{},stop:()=>{},restart:()=>{},destroy:()=>{},isRunning:()=>!1,isPaused:()=>!1};const s=o.map(e=>({element:e,unitSpans:[],cursorSpan:null,currentAction:0,charTimerId:null,waitTimerId:null,paused:!1,loopCount:0,lastRenderStart:0})),i=new Map;async function r(e){if(e.paused)return;if(e.currentAction>=n.actions.length)return void(!0===n.loop||"number"==typeof n.loop&&e.loopCount<n.loop-1?(e.loopCount++,n.onLoop&&n.onLoop(e.loopCount),e.unitSpans.forEach(e=>e.remove()),e.unitSpans=[],e.lastRenderStart=0,e.currentAction=0,e.waitTimerId=setTimeout(()=>{e.paused||r(e)},n.loopDelay)):n.onComplete&&n.onComplete());const t=n.actions[e.currentAction];void 0!==t.render?await function(e,t){return new Promise(o=>{const s=String(t.render),i=t.effect||"none",r=function(e,t){if("word"===t)return e.match(/(\S+\s*)/g)||[];if("sentence"===t){const t=e.match(/([^.!?]*[.!?]+\s*)/g)||[],n=t.join("");return n.length<e.length&&t.push(e.substring(n.length)),t}return e.split("")}(s,n.mode),a="word"===(l=n.mode)?"dm-scribe-word":"sentence"===l?"dm-scribe-sentence":"dm-scribe-char";var l;e.lastRenderStart=e.unitSpans.length;let d=0,c=performance.now();function h(t){if(e.paused)return;if(d>=r.length)return n.onRender&&n.onRender(s),void o();if(t-c<n.speed)return void(e.charTimerId=requestAnimationFrame(h));c=t;const l=r[d],u=document.createElement("span");u.className=a,u.textContent=l,"fade"===i?u.classList.add("dm-scribe-fade"):"bounce"===i?u.classList.add("dm-scribe-bounce"):"glow"===i&&u.classList.add("dm-scribe-glow");const p=document.createDocumentFragment();p.appendChild(u),e.cursorSpan?e.element.insertBefore(p,e.cursorSpan):e.element.appendChild(p),e.unitSpans.push(u),n.onCharacter&&n.onCharacter(l,e.unitSpans.length-1),d++,e.charTimerId=requestAnimationFrame(h)}e.charTimerId=requestAnimationFrame(h)})}(e,t):void 0!==t.wait?await function(e,t){return new Promise(n=>{const o=function(e){if("number"==typeof e)return Number.isFinite(e)?e:0;if("string"!=typeof e)return 0;const t=parseFloat(e);return Number.isFinite(t)?e.endsWith("ms")?t:e.endsWith("s")?1e3*t:0:0}(t.wait);e.waitTimerId=setTimeout(()=>{e.paused||n()},o)})}(e,t):void 0!==t.undoRender&&await function(e,t){return new Promise(o=>{let s=0;const i=t.undoRender;if(!0===i?s=e.unitSpans.length-e.lastRenderStart:"all"===i?s=e.unitSpans.length:"number"==typeof i&&(s=Math.min(i,e.unitSpans.length)),0===s)return void o();const r=[];let a=0,l=performance.now();function d(t){if(e.paused)return;if(a>=s){const e=r.reverse().join("");return n.onUndoRender&&n.onUndoRender(e),void o()}if(t-l<n.deleteSpeed)e.charTimerId=requestAnimationFrame(d);else{if(l=t,e.unitSpans.length>0){const t=e.unitSpans.pop();r.push(t.textContent),t.remove()}a++,e.charTimerId=requestAnimationFrame(d)}}e.charTimerId=requestAnimationFrame(d)})}(e,t),e.currentAction++,r(e)}return s.forEach(e=>{if(n.cursor){e.cursorSpan=document.createElement("span");let t=["dm-scribe-cursor"];"block"===n.cursorType?t.push("dm-scribe-cursor-block"):"underline"===n.cursorType?t.push("dm-scribe-cursor-underline"):t.push("dm-scribe-cursor-caret"),n.cursorBlink||t.push("dm-scribe-cursor-no-blink"),e.cursorSpan.className=t.join(" "),e.cursorSpan.textContent="underline"===n.cursorType?" ":n.cursorChar,e.element.appendChild(e.cursorSpan)}}),s.forEach(e=>{if(n.pauseOnHover){const t=()=>{e.paused=!0,e.charTimerId&&cancelAnimationFrame(e.charTimerId),e.waitTimerId&&clearTimeout(e.waitTimerId)},n=()=>{e.paused=!1,r(e)};e.element.addEventListener("mouseenter",t),e.element.addEventListener("mouseleave",n),i.set(e.element,{mouseEnterHandler:t,mouseLeaveHandler:n})}n.autoStart&&r(e)}),n.onStart&&n.onStart(),{pause(){s.forEach(e=>{e.paused=!0,e.charTimerId&&cancelAnimationFrame(e.charTimerId),e.waitTimerId&&clearTimeout(e.waitTimerId)})},resume(){s.forEach(e=>{e.paused=!1,r(e)})},stop(){s.forEach(e=>{e.paused=!0,e.currentAction=n.actions.length,e.charTimerId&&cancelAnimationFrame(e.charTimerId),e.waitTimerId&&clearTimeout(e.waitTimerId)})},restart(){s.forEach(e=>{e.charTimerId&&cancelAnimationFrame(e.charTimerId),e.waitTimerId&&clearTimeout(e.waitTimerId),e.unitSpans.forEach(e=>e.remove()),e.unitSpans=[],e.currentAction=0,e.loopCount=0,e.lastRenderStart=0,e.paused=!1,r(e)})},destroy(){s.forEach(e=>{if(e.charTimerId&&cancelAnimationFrame(e.charTimerId),e.waitTimerId&&clearTimeout(e.waitTimerId),e.unitSpans.forEach(e=>e.remove()),e.cursorSpan&&e.cursorSpan.remove(),i.has(e.element)){const t=i.get(e.element);e.element.removeEventListener("mouseenter",t.mouseEnterHandler),e.element.removeEventListener("mouseleave",t.mouseLeaveHandler),i.delete(e.element)}})},isRunning(){if(0===s.length)return!1;const e=s[0];return!e.paused&&e.currentAction<n.actions.length},isPaused:()=>0!==s.length&&s[0].paused}},reveal:function(e,t={}){const n={animation:"fade",duration:600,easing:"ease-out",delay:0,stagger:0,threshold:.1,rootMargin:"0px",once:!0,respectMotionPreference:!0,onReveal:null,...t},o=Uo(e,"reveal");if(!o)return null;if(n.respectMotionPreference&&Ko())return o.forEach(e=>{e.classList.add("dm-reveal-visible")}),{pause:()=>{},resume:()=>{},stop:()=>{},restart:()=>{},destroy:()=>{},isRunning:()=>!1,isPaused:()=>!1};o.forEach((e,t)=>{e.classList.add("dm-reveal",`dm-reveal-${n.animation}`),e.style.transitionDuration=`${n.duration}ms`,e.style.transitionTimingFunction=n.easing;const o=n.delay+t*n.stagger;o>0&&(e.style.transitionDelay=`${o}ms`),n.respectMotionPreference||e.setAttribute("data-force-animation","true")});const s=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting?(e.target.classList.add("dm-reveal-visible"),n.onReveal&&n.onReveal(e.target),n.once&&s.unobserve(e.target)):n.once||e.target.classList.remove("dm-reveal-visible")})},{threshold:n.threshold,rootMargin:n.rootMargin});return o.forEach(e=>s.observe(e)),{pause(){},resume(){},stop(){s.disconnect()},restart(){o.forEach(e=>{e.classList.remove("dm-reveal-visible"),s.observe(e)})},destroy(){s.disconnect(),o.forEach(e=>{e.classList.remove("dm-reveal","dm-reveal-visible",`dm-reveal-${n.animation}`),e.style.transitionDuration="",e.style.transitionTimingFunction="",e.style.transitionDelay=""})},isRunning:()=>!0,isPaused:()=>!1}},scramble:function(e,t={}){const n={speed:50,scrambleSpeed:30,characters:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%&*",revealOrder:"left-to-right",scrambleDuration:800,stagger:0,loop:!1,loopDelay:2e3,respectMotionPreference:!0,onComplete:null,onCharacter:null,...t},o=Uo(e,"scramble");if(!o)return null;if(n.respectMotionPreference&&Ko())return{pause:()=>{},resume:()=>{},stop:()=>{},restart:()=>{},destroy:()=>{},isRunning:()=>!1,isPaused:()=>!1};const s=o.map((e,t)=>({element:e,originalText:e.textContent,rafId:null,timeoutId:null,paused:!1,loopCount:0}));function i(){return n.characters[Math.floor(Math.random()*n.characters.length)]}function r(e){if(e.paused)return;const t=e.originalText,o=t.length;if(0===o)return void(n.onComplete&&n.onComplete());const s=function(e,t){const n=Array.from({length:e},(e,t)=>t);switch(t){case"right-to-left":return n.reverse();case"random":for(let e=n.length-1;e>0;e--){const t=Math.floor(Math.random()*(e+1));[n[e],n[t]]=[n[t],n[e]]}return n;case"center-out":{const t=Math.floor(e/2),n=[t];for(let o=1;o<=t;o++)t-o>=0&&n.push(t-o),t+o<e&&n.push(t+o);return n}default:return n}}(o,n.revealOrder),a=new Array(o).fill(!1),l=t.split("").map(e=>" "===e?" ":i()),d=performance.now(),c=n.speed;e.rafId=requestAnimationFrame(function h(u){if(e.paused)return;const p=u-d;s.forEach((e,o)=>{if(a[e])return;const s=n.scrambleDuration+o*c;p>=s&&(a[e]=!0,l[e]=t[e],n.onCharacter&&n.onCharacter(t[e],e))});for(let e=0;e<o;e++)a[e]||" "===t[e]||(l[e]=i());if(e.element.innerHTML=l.map((e,t)=>`<span class="dm-scramble-char${a[t]?" dm-scramble-resolved":""}">${e}</span>`).join(""),a.every(Boolean))return n.onComplete&&n.onComplete(),void function(e){if(!1===n.loop)return;if("number"==typeof n.loop&&e.loopCount>=n.loop-1)return;e.loopCount++,e.timeoutId=setTimeout(()=>{e.paused||r(e)},n.loopDelay)}(e);e.rafId=requestAnimationFrame(h)})}return s.forEach((e,t)=>{const o=t*n.stagger;o>0?e.timeoutId=setTimeout(()=>r(e),o):r(e)}),{pause(){s.forEach(e=>{e.paused=!0,e.rafId&&cancelAnimationFrame(e.rafId),e.timeoutId&&clearTimeout(e.timeoutId)})},resume(){s.forEach(e=>{e.paused=!1,r(e)})},stop(){s.forEach(e=>{e.paused=!0,e.rafId&&cancelAnimationFrame(e.rafId),e.timeoutId&&clearTimeout(e.timeoutId),e.element.textContent=e.originalText})},restart(){s.forEach(e=>{e.rafId&&cancelAnimationFrame(e.rafId),e.timeoutId&&clearTimeout(e.timeoutId),e.paused=!1,e.loopCount=0,r(e)})},destroy(){s.forEach(e=>{e.rafId&&cancelAnimationFrame(e.rafId),e.timeoutId&&clearTimeout(e.timeoutId),e.element.textContent=e.originalText})},isRunning:()=>s.length>0&&!s[0].paused,isPaused:()=>s.length>0&&s[0].paused}},counter:function(e,t={}){const n={from:0,to:null,duration:2e3,easing:"ease-out",decimals:0,separator:",",prefix:"",suffix:"",stagger:0,trigger:"immediate",threshold:.5,respectMotionPreference:!0,onUpdate:null,onComplete:null,...t},o=Uo(e,"counter");if(!o)return null;if(n.respectMotionPreference&&Ko())return o.forEach(e=>{const t=null!==n.to?n.to:parseFloat(e.textContent.replace(/[^0-9.\-]/g,""))||0;e.textContent=n.prefix+s(t,n.decimals,n.separator)+n.suffix}),{pause:()=>{},resume:()=>{},stop:()=>{},restart:()=>{},destroy:()=>{},isRunning:()=>!1,isPaused:()=>!1};function s(e,t,n){const o=e.toFixed(t);if(!n)return o;const s=o.split(".");return s[0]=s[0].replace(/\B(?=(\d{3})+(?!\d))/g,n),s.join(".")}const i=o.map((e,t)=>{const o=null!==n.to?n.to:parseFloat(e.textContent.replace(/[^0-9.\-]/g,""))||0;return{element:e,from:n.from,to:o,rafId:null,timeoutId:null,startTime:null,paused:!1,complete:!1}});function r(e){e.paused||(e.startTime=performance.now(),e.complete=!1,e.rafId=requestAnimationFrame(function t(o){if(e.paused)return;const i=o-e.startTime,r=Math.min(i/n.duration,1),a=function(e){switch(n.easing){case"linear":return e;case"ease-in-out":return e<.5?2*e*e:(4-2*e)*e-1;default:return 1-Math.pow(1-e,3)}}(r),l=e.from+(e.to-e.from)*a;e.element.textContent=n.prefix+s(l,n.decimals,n.separator)+n.suffix,n.onUpdate&&n.onUpdate(l),r<1?e.rafId=requestAnimationFrame(t):(e.complete=!0,e.element.textContent=n.prefix+s(e.to,n.decimals,n.separator)+n.suffix,n.onComplete&&n.onComplete())}))}let a=null;function l(e,t){t>0?e.timeoutId=setTimeout(()=>r(e),t):r(e)}return"scroll"===n.trigger?(a=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting){const t=i.find(t=>t.element===e.target);if(t&&!t.complete){l(t,i.indexOf(t)*n.stagger)}a.unobserve(e.target)}})},{threshold:n.threshold}),o.forEach(e=>a.observe(e))):i.forEach((e,t)=>{l(e,t*n.stagger)}),{pause(){i.forEach(e=>{e.paused=!0,e.rafId&&cancelAnimationFrame(e.rafId),e.timeoutId&&clearTimeout(e.timeoutId)})},resume(){i.forEach(e=>{e.paused&&!e.complete&&(e.paused=!1,r(e))})},stop(){i.forEach(e=>{e.paused=!0,e.rafId&&cancelAnimationFrame(e.rafId),e.timeoutId&&clearTimeout(e.timeoutId)}),a&&a.disconnect()},restart(){i.forEach((e,t)=>{e.rafId&&cancelAnimationFrame(e.rafId),e.timeoutId&&clearTimeout(e.timeoutId),e.paused=!1,e.complete=!1,l(e,t*n.stagger)})},destroy(){i.forEach(e=>{e.rafId&&cancelAnimationFrame(e.rafId),e.timeoutId&&clearTimeout(e.timeoutId)}),a&&a.disconnect()},isRunning:()=>i.length>0&&!i[0].paused&&!i[0].complete,isPaused:()=>i.length>0&&i[0].paused}},ripple:function(e,t={}){const n={colour:"rgba(255, 255, 255, 0.35)",duration:600,opacity:.35,unbounded:!1,centered:!1,trigger:"pointerdown",respectMotionPreference:!0,...t},o=Uo(e,"ripple");if(!o)return null;if(n.respectMotionPreference&&Ko())return{pause:()=>{},resume:()=>{},stop:()=>{},restart:()=>{},destroy:()=>{},isRunning:()=>!1,isPaused:()=>!1};const s="domma-ripple-keyframes";if(!document.getElementById(s)){const e=document.createElement("style");e.id=s,e.textContent="\n @keyframes dm-ripple-expand {\n 0% {\n transform: scale(0);\n opacity: var(--dm-ripple-opacity, 0.35);\n }\n 100% {\n transform: scale(4);\n opacity: 0;\n }\n }\n ",document.head.appendChild(e)}const i=new Map;return o.forEach(e=>{e.classList.add("dm-ripple-container");"static"===getComputedStyle(e).position&&(e.style.position="relative"),n.unbounded||(e.style.overflow="hidden"),n.respectMotionPreference||e.setAttribute("data-force-animation","true");const t=t=>{const o=e.getBoundingClientRect(),s=2*Math.max(o.width,o.height);let i,r;n.centered?(i=o.width/2,r=o.height/2):(i=(t.clientX||t.touches?.[0]?.clientX||o.width/2)-o.left,r=(t.clientY||t.touches?.[0]?.clientY||o.height/2)-o.top);const a=document.createElement("span");a.className="dm-ripple",n.respectMotionPreference||a.setAttribute("data-force-animation","true"),a.style.cssText=`\n position: absolute;\n border-radius: 50%;\n pointer-events: none;\n width: ${s}px;\n height: ${s}px;\n left: ${i-s/2}px;\n top: ${r-s/2}px;\n background: ${n.colour};\n --dm-ripple-opacity: ${n.opacity};\n animation: dm-ripple-expand ${n.duration}ms ease-out forwards;\n `,e.appendChild(a),setTimeout(()=>{a.remove()},n.duration)};e.addEventListener(n.trigger,t),i.set(e,t)}),{pause(){},resume(){},stop(){},restart(){},destroy(){o.forEach(e=>{i.has(e)&&(e.removeEventListener(n.trigger,i.get(e)),i.delete(e)),e.classList.remove("dm-ripple-container"),e.querySelectorAll(".dm-ripple").forEach(e=>e.remove())})},isRunning:()=>!0,isPaused:()=>!1}},shake:function(e,t={}){const n={intensity:6,duration:500,direction:"horizontal",easing:"ease-in-out",iterations:1,stagger:0,respectMotionPreference:!0,onComplete:null,...t},o=Uo(e,"shake");if(!o)return null;if(n.respectMotionPreference&&Ko())return n.onComplete&&n.onComplete(),{pause:()=>{},resume:()=>{},stop:()=>{},restart:()=>{},destroy:()=>{},isRunning:()=>!1,isPaused:()=>!1};const s=`domma-shake-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,i=n.intensity;let r;switch(n.direction){case"vertical":r=`\n 0%, 100% { transform: translateY(0); }\n 10%, 30%, 50%, 70%, 90% { transform: translateY(-${i}px); }\n 20%, 40%, 60%, 80% { transform: translateY(${i}px); }\n `;break;case"both":r=`\n 0%, 100% { transform: translate(0, 0); }\n 10% { transform: translate(-${i}px, -${i}px); }\n 20% { transform: translate(${i}px, ${i}px); }\n 30% { transform: translate(-${i}px, ${i}px); }\n 40% { transform: translate(${i}px, -${i}px); }\n 50% { transform: translate(-${i}px, 0); }\n 60% { transform: translate(${i}px, 0); }\n 70% { transform: translate(0, -${i}px); }\n 80% { transform: translate(0, ${i}px); }\n 90% { transform: translate(-${i}px, -${i}px); }\n `;break;default:r=`\n 0%, 100% { transform: translateX(0); }\n 10%, 30%, 50%, 70%, 90% { transform: translateX(-${i}px); }\n 20%, 40%, 60%, 80% { transform: translateX(${i}px); }\n `}const a=document.createElement("style");a.setAttribute("data-domma-effect",s),a.textContent=`@keyframes ${s} { ${r} }`,document.head.appendChild(a);const l=new Map;return o.forEach((e,t)=>{const i=t*n.stagger,r=()=>{e.style.animation=`${s} ${n.duration}ms ${n.easing} ${n.iterations}`;const i=()=>{e.style.animation="",e.removeEventListener("animationend",i),l.delete(e),n.onComplete&&t===o.length-1&&n.onComplete()};e.addEventListener("animationend",i),l.set(e,i)};i>0?setTimeout(r,i):r()}),{pause(){o.forEach(e=>e.style.animationPlayState="paused")},resume(){o.forEach(e=>e.style.animationPlayState="running")},stop(){o.forEach(e=>{e.style.animation="",l.has(e)&&(e.removeEventListener("animationend",l.get(e)),l.delete(e))})},restart(){o.forEach((e,t)=>{e.style.animation="none",e.offsetHeight,e.style.animation=`${s} ${n.duration}ms ${n.easing} ${n.iterations}`})},destroy(){o.forEach(e=>{e.style.animation="",l.has(e)&&(e.removeEventListener("animationend",l.get(e)),l.delete(e))}),a.remove()},isRunning:()=>o.length>0&&""!==o[0].style.animation&&"paused"!==o[0].style.animationPlayState,isPaused:()=>o.length>0&&"paused"===o[0].style.animationPlayState}},twinkle:function(e,t={}){const n={count:100,minSize:1,maxSize:3,twinkleSpeed:.003,colour:"rgba(255, 240, 200, 1)",zIndex:1,shape:"star",respectMotionPreference:!0,...t};if(n.respectMotionPreference&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)return console.log("[Domma.effects.twinkle] Disabled due to prefers-reduced-motion"),{pause:()=>{},resume:()=>{},stop:()=>{},restart:()=>{},destroy:()=>{},isRunning:()=>!1,isPaused:()=>!1};const o=!e||"body"===e||e===document.body;let s=[];if(!o&&("string"==typeof e?s=Array.from(document.querySelectorAll(e)):e instanceof Element?s=[e]:(e instanceof NodeList||Array.isArray(e))&&(s=Array.from(e)),0===s.length))return console.warn("[Domma.effects.twinkle] No elements found for selector:",e),null;let i=!1,r=!1,a=null;const l=`domma-twinkle-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,d=[];function c(e,t){const o=[];for(let s=0;s<n.count;s++)o.push({x:Math.random()*e,y:Math.random()*t,size:n.minSize+Math.random()*(n.maxSize-n.minSize),opacity:.3+.7*Math.random(),twinklePhase:Math.random()*Math.PI*2,twinkleSpeed:n.twinkleSpeed+Math.random()*n.twinkleSpeed});return o}function h(e,t){const o=document.createElement("canvas");if(o.id=l+(d.length>0?`-${d.length}`:""),o.setAttribute("data-domma-effect","twinkle"),o.style.pointerEvents="none",o.style.zIndex=n.zIndex,t)o.style.position="fixed",o.style.top="0",o.style.left="0",o.style.width="100%",o.style.height="100%",o.width=window.innerWidth,o.height=window.innerHeight,document.body.appendChild(o);else{"static"===window.getComputedStyle(e).position&&(e.style.position="relative"),o.style.position="absolute",o.style.top="0",o.style.left="0",o.style.width="100%",o.style.height="100%",o.width=e.offsetWidth||e.getBoundingClientRect().width,o.height=e.offsetHeight||e.getBoundingClientRect().height,e.appendChild(o)}const s=o.getContext("2d");return{canvas:o,ctx:s,stars:c(o.width,o.height),container:e}}function u(e){if(e.isFixed)e.canvas.width=window.innerWidth,e.canvas.height=window.innerHeight;else{const t=e.container.getBoundingClientRect();e.canvas.width=t.width||e.container.offsetWidth,e.canvas.height=t.height||e.container.offsetHeight}e.stars=c(e.canvas.width,e.canvas.height)}if(o){const e=h(document.body,!0);e.isFixed=!0,d.push(e)}else s.forEach(e=>{const t=h(e,!1);t.isFixed=!1,d.push(t)});let p=null;if(o){const e=()=>d.forEach(e=>u(e));window.addEventListener("resize",e),d[0]._resizeHandler=e}else"undefined"!=typeof ResizeObserver&&(p=new ResizeObserver(()=>{d.forEach(e=>u(e))}),s.forEach(e=>p.observe(e)));function m(){i&&!r&&(d.forEach(({canvas:e,ctx:t,stars:o})=>{t.clearRect(0,0,e.width,e.height),o.forEach(e=>function(e,t){t.twinklePhase+=t.twinkleSpeed;const o=.3+.7*Math.sin(t.twinklePhase);if(e.save(),e.globalAlpha=t.opacity*o,e.fillStyle=n.colour,e.shadowColor=n.colour,"circle"===n.shape)e.shadowBlur=2*t.size,e.beginPath(),e.arc(t.x,t.y,.6*t.size,0,2*Math.PI),e.fill();else{e.shadowBlur=2*t.size,e.beginPath();for(let n=0;n<4;n++){const o=n*Math.PI/2,s=t.x+Math.cos(o)*t.size,i=t.y+Math.sin(o)*t.size,r=o+Math.PI/4,a=t.x+Math.cos(r)*(.3*t.size),l=t.y+Math.sin(r)*(.3*t.size);0===n?e.moveTo(s,i):e.lineTo(s,i),e.lineTo(a,l)}e.closePath(),e.fill(),e.shadowBlur=t.size,e.beginPath(),e.arc(t.x,t.y,.25*t.size,0,2*Math.PI),e.fill()}e.restore()}(t,e))}),a=requestAnimationFrame(m))}function f(){i||(i=!0,r=!1,m())}return f(),console.log(`[Domma.effects.twinkle] Initialised with ${n.count} stars (${o?"full-page":"container"} mode)`),{pause(){i&&!r&&(r=!0,a&&(cancelAnimationFrame(a),a=null))},resume(){i&&r&&(r=!1,m())},stop(){i=!1,r=!1,a&&(cancelAnimationFrame(a),a=null)},restart(){this.stop(),d.forEach(e=>{e.stars=c(e.canvas.width,e.canvas.height)}),f()},destroy(){this.stop(),o&&d[0]?._resizeHandler&&window.removeEventListener("resize",d[0]._resizeHandler),p&&(p.disconnect(),p=null),d.forEach(({canvas:e})=>{e&&e.parentNode&&e.parentNode.removeChild(e)}),d.length=0},isRunning:()=>i&&!r,isPaused:()=>i&&r}},tickerTape:function(e,t={}){const n={palette:"theme",density:50,speed:1,sway:60,rotationSpeed:6,minWidth:5,maxWidth:9,minHeight:12,maxHeight:22,fadeStart:.55,burst:!1,burstCount:150,zIndex:1,respectMotionPreference:!0,...t};if(n.respectMotionPreference&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)return console.log("[Domma.effects.tickerTape] Disabled due to prefers-reduced-motion"),{pause:()=>{},resume:()=>{},stop:()=>{},restart:()=>{},destroy:()=>{},isRunning:()=>!1,isPaused:()=>!1};const o=!e||"body"===e||e===document.body;let s=[];if(!o&&("string"==typeof e?s=Array.from(document.querySelectorAll(e)):e instanceof Element?s=[e]:(e instanceof NodeList||Array.isArray(e))&&(s=Array.from(e)),0===s.length))return console.warn("[Domma.effects.tickerTape] No elements found for selector:",e),null;const i=Zo(n.palette);let r=!1,a=!1,l=null;const d=`domma-ticker-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,c=[];let h=null;function u(e,t,o){const s=n.minWidth+Math.random()*(n.maxWidth-n.minWidth),r=n.minHeight+Math.random()*(n.maxHeight-n.minHeight);return{x:Math.random()*e,y:o?-r-40*Math.random():Math.random()*-t,vy:(1+2.2*Math.random())*n.speed,vx:.4*(Math.random()-.5)*n.speed,swayPhase:Math.random()*Math.PI*2,swayFreq:.005+.01*Math.random(),width:s,height:r,rotation:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*n.rotationSpeed*Math.PI/180,colour:i[Math.floor(Math.random()*i.length)],alive:!0}}function p(e,t){e.swayPhase+=e.swayFreq,e.x+=e.vx+Math.sin(e.swayPhase)*(.02*n.sway),e.y+=e.vy,e.rotation+=e.rotationSpeed;const o=e.y/t;if(o>=n.fadeStart){const t=1-n.fadeStart,s=(o-n.fadeStart)/t;e.alpha=Math.max(0,1-s)}else e.alpha=1;(e.y-e.height>t||e.alpha<=.01)&&(e.alive=!1)}function m(e,t){t.alpha<=0||(e.save(),e.globalAlpha=t.alpha,e.translate(t.x,t.y),e.rotate(t.rotation),e.fillStyle=t.colour,e.fillRect(-t.width/2,-t.height/2,t.width,t.height),e.restore())}function f(e,t){const o=document.createElement("canvas");if(o.id=d+(c.length>0?`-${c.length}`:""),o.setAttribute("data-domma-effect","ticker-tape"),o.style.pointerEvents="none",o.style.zIndex=n.zIndex,t)o.style.position="fixed",o.style.top="0",o.style.left="0",o.style.width="100%",o.style.height="100%",o.width=window.innerWidth,o.height=window.innerHeight,document.body.appendChild(o);else{"static"===window.getComputedStyle(e).position&&(e.style.position="relative"),o.style.position="absolute",o.style.top="0",o.style.left="0",o.style.width="100%",o.style.height="100%",o.width=e.offsetWidth||e.getBoundingClientRect().width,o.height=e.offsetHeight||e.getBoundingClientRect().height,e.appendChild(o)}const s=o.getContext("2d");return{canvas:o,ctx:s,particles:[],container:e,burstFired:!1}}function g(e){if(e.particles=[],n.burst){for(let t=0;t<n.burstCount;t++){const t=u(e.canvas.width,e.canvas.height,!1);t.y=-Math.random()*e.canvas.height*1.5,e.particles.push(t)}e.burstFired=!0}else{const t=Math.floor(.5*n.density);for(let n=0;n<t;n++)e.particles.push(u(e.canvas.width,e.canvas.height,!1))}}function v(e){if(e.isFixed)e.canvas.width=window.innerWidth,e.canvas.height=window.innerHeight;else{const t=e.container.getBoundingClientRect();e.canvas.width=t.width||e.container.offsetWidth,e.canvas.height=t.height||e.container.offsetHeight}}if(o){const e=f(document.body,!0);e.isFixed=!0,g(e),c.push(e);const t=()=>c.forEach(e=>v(e));window.addEventListener("resize",t),c[0]._resizeHandler=t}else s.forEach(e=>{const t=f(e,!1);t.isFixed=!1,g(t),c.push(t)}),"undefined"!=typeof ResizeObserver&&(h=new ResizeObserver(()=>{c.forEach(e=>v(e))}),s.forEach(e=>h.observe(e)));function y(){r&&!a&&(c.forEach(e=>{const{canvas:t,ctx:o,particles:s}=e;o.clearRect(0,0,t.width,t.height);for(let e=s.length-1;e>=0;e--){const n=s[e];p(n,t.height),n.alive?m(o,n):s.splice(e,1)}if(!n.burst){const e=n.density;for(;s.length<e&&Math.random()<.6;)s.push(u(t.width,t.height,!0))}}),l=requestAnimationFrame(y))}function b(){r||(r=!0,a=!1,y())}return b(),console.log(`[Domma.effects.tickerTape] Initialised (${o?"full-page":"container"} mode, palette: ${Array.isArray(n.palette)?"custom":n.palette})`),{pause(){r&&!a&&(a=!0,l&&(cancelAnimationFrame(l),l=null))},resume(){r&&a&&(a=!1,y())},stop(){r=!1,a=!1,l&&(cancelAnimationFrame(l),l=null)},restart(){this.stop(),c.forEach(e=>g(e)),b()},destroy(){this.stop(),o&&c[0]?._resizeHandler&&window.removeEventListener("resize",c[0]._resizeHandler),h&&(h.disconnect(),h=null),c.forEach(({canvas:e})=>{e&&e.parentNode&&e.parentNode.removeChild(e)}),c.length=0},isRunning:()=>r&&!a,isPaused:()=>r&&a}},butterflies:function(e,t={}){const n={palette:"meadow",density:18,speed:1,wander:1,riseSpeed:.4,flapSpeed:1,minSize:14,maxSize:26,twoTone:!0,burst:!1,burstCount:40,zIndex:1,respectMotionPreference:!0,...t};if(n.respectMotionPreference&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)return console.log("[Domma.effects.butterflies] Disabled due to prefers-reduced-motion"),{pause:()=>{},resume:()=>{},stop:()=>{},restart:()=>{},destroy:()=>{},isRunning:()=>!1,isPaused:()=>!1};const o=!e||"body"===e||e===document.body;let s=[];if(!o&&("string"==typeof e?s=Array.from(document.querySelectorAll(e)):e instanceof Element?s=[e]:(e instanceof NodeList||Array.isArray(e))&&(s=Array.from(e)),0===s.length))return console.warn("[Domma.effects.butterflies] No elements found for selector:",e),null;const i=Xo(n.palette);let r=!1,a=!1,l=null;const d=`domma-butterflies-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,c=[];let h=null;function u(e,t){const o=n.minSize+Math.random()*(n.maxSize-n.minSize),s=Math.random();let r,a;s<.6?(r=Math.random()*e,a=t+o):s<.8?(r=-o,a=t*(.4+.6*Math.random())):(r=e+o,a=t*(.4+.6*Math.random()));const l=-Math.PI/2+1.2*(Math.random()-.5),d=i[Math.floor(Math.random()*i.length)],c=n.twoTone?i[Math.floor(Math.random()*i.length)]:d;return{x:r,y:a,heading:l,targetHeading:l,speed:.6+.8*Math.random(),wanderTimer:60*Math.random(),flapPhase:Math.random()*Math.PI*2,flapSpeed:(.18+.12*Math.random())*n.flapSpeed,size:o,colourUpper:d,colourLower:c,alpha:1,alive:!0}}function p(e,t,o){e.wanderTimer-=1,e.wanderTimer<=0&&(e.targetHeading=-Math.PI/2+(Math.random()-.5)*(1.4*n.wander),e.wanderTimer=30+Math.random()*(60/Math.max(.2,n.wander)));let s=e.targetHeading-e.heading;for(;s>Math.PI;)s-=2*Math.PI;for(;s<-Math.PI;)s+=2*Math.PI;e.heading+=.05*s*n.wander;const i=e.speed*n.speed;e.x+=Math.cos(e.heading)*i+.3*Math.sin(e.flapPhase),e.y+=Math.sin(e.heading)*i-n.riseSpeed*n.speed,e.flapPhase+=e.flapSpeed,(e.y+e.size<0||e.y-e.size>2*o||e.x<3*-e.size||e.x>t+3*e.size)&&(e.alive=!1)}function m(e,t){const n=Math.abs(Math.sin(t.flapPhase)),o=t.size*(.25+.75*n)/2,s=.6*t.size;e.save(),e.globalAlpha=t.alpha,e.translate(t.x,t.y),e.rotate(t.heading+Math.PI/2),e.fillStyle=t.colourUpper,e.beginPath(),e.ellipse(-o,.3*-s,o,.6*s,0,0,2*Math.PI),e.ellipse(o,.3*-s,o,.6*s,0,0,2*Math.PI),e.fill(),e.fillStyle=t.colourLower,e.beginPath(),e.ellipse(.85*-o,.35*s,.8*o,.5*s,0,0,2*Math.PI),e.ellipse(.85*o,.35*s,.8*o,.5*s,0,0,2*Math.PI),e.fill(),e.strokeStyle="rgba(40,30,30,0.8)",e.lineWidth=Math.max(1,.06*t.size),e.beginPath(),e.moveTo(0,.7*-s),e.lineTo(0,.7*s),e.stroke(),e.restore()}function f(e,t){const o=document.createElement("canvas");o.id=d+(c.length>0?`-${c.length}`:""),o.setAttribute("data-domma-effect","butterflies"),o.style.pointerEvents="none",o.style.zIndex=n.zIndex,t?(o.style.position="fixed",o.style.top="0",o.style.left="0",o.style.width="100%",o.style.height="100%",o.width=window.innerWidth,o.height=window.innerHeight,document.body.appendChild(o)):("static"===window.getComputedStyle(e).position&&(e.style.position="relative"),o.style.position="absolute",o.style.top="0",o.style.left="0",o.style.width="100%",o.style.height="100%",o.width=e.offsetWidth||e.getBoundingClientRect().width,o.height=e.offsetHeight||e.getBoundingClientRect().height,e.appendChild(o));const s=o.getContext("2d");return{canvas:o,ctx:s,particles:[],container:e,burstFired:!1}}function g(e){if(e.particles=[],n.burst){for(let t=0;t<n.burstCount;t++)e.particles.push(u(e.canvas.width,e.canvas.height));e.burstFired=!0}else{const t=Math.floor(.5*n.density);for(let n=0;n<t;n++)e.particles.push(u(e.canvas.width,e.canvas.height))}}function v(e){if(e.isFixed)e.canvas.width=window.innerWidth,e.canvas.height=window.innerHeight;else{const t=e.container.getBoundingClientRect();e.canvas.width=t.width||e.container.offsetWidth,e.canvas.height=t.height||e.container.offsetHeight}}if(o){const e=f(document.body,!0);e.isFixed=!0,g(e),c.push(e);const t=()=>c.forEach(e=>v(e));window.addEventListener("resize",t),c[0]._resizeHandler=t}else s.forEach(e=>{const t=f(e,!1);t.isFixed=!1,g(t),c.push(t)}),"undefined"!=typeof ResizeObserver&&(h=new ResizeObserver(()=>c.forEach(e=>v(e))),s.forEach(e=>h.observe(e)));function y(){r&&!a&&(c.forEach(e=>{const{canvas:t,ctx:o,particles:s}=e;o.clearRect(0,0,t.width,t.height);for(let e=s.length-1;e>=0;e--){const n=s[e];p(n,t.width,t.height),n.alive?m(o,n):s.splice(e,1)}if(!n.burst)for(;s.length<n.density&&Math.random()<.3;)s.push(u(t.width,t.height))}),l=requestAnimationFrame(y))}function b(){r||(r=!0,a=!1,y())}return b(),console.log(`[Domma.effects.butterflies] Initialised (${o?"full-page":"container"} mode, palette: ${Array.isArray(n.palette)?"custom":n.palette})`),{pause(){r&&!a&&(a=!0,l&&(cancelAnimationFrame(l),l=null))},resume(){r&&a&&(a=!1,y())},stop(){r=!1,a=!1,l&&(cancelAnimationFrame(l),l=null)},restart(){this.stop(),c.forEach(e=>g(e)),b()},destroy(){this.stop(),o&&c[0]?._resizeHandler&&window.removeEventListener("resize",c[0]._resizeHandler),h&&(h.disconnect(),h=null),c.forEach(({canvas:e})=>{e&&e.parentNode&&e.parentNode.removeChild(e)}),c.length=0},isRunning:()=>r&&!a,isPaused:()=>r&&a}},strobe:function(e,t={}){var n;const o={preset:"club",origins:["tl","tr","bl","br"],motion:"sweep",sweepArc:100,speed:1,beamWidth:16,flicker:!0,hz:10,colours:["#ffffff","#38bdf8","#f472b6","#a855f7"],intensity:.7,duration:null,zIndex:9999,respectMotionPreference:!0,...(n=t.preset||"club",Yo[n]?Yo[n]:(console.warn(`[Domma.effects.strobe] Unknown preset '${n}', using 'club'.`),Yo.club)),...t};if(o.respectMotionPreference&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)return console.log("[Domma.effects.strobe] Disabled due to prefers-reduced-motion"),{pause:()=>{},resume:()=>{},stop:()=>{},restart:()=>{},destroy:()=>{},isRunning:()=>!1,isPaused:()=>!1};o.flicker&&o.hz>5&&console.warn(`[Domma.effects.strobe] flicker hz=${o.hz} exceeds 5Hz - rapid flashing can trigger photosensitive seizures.`);const s=!e||"body"===e||e===document.body;let i=[];if(!s&&("string"==typeof e?i=Array.from(document.querySelectorAll(e)):e instanceof Element?i=[e]:(e instanceof NodeList||Array.isArray(e))&&(i=Array.from(e)),0===i.length))return console.warn("[Domma.effects.strobe] No elements found for selector:",e),null;let r=!1,a=!1,l=null,d=null;const c=`domma-strobe-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,h=[];let u=null;function p(){return o.origins.map((e,t)=>({corner:e,colour:o.colours[t%o.colours.length],phase:t/Math.max(1,o.origins.length)*Math.PI*2}))}const m=[{widthMul:1.9,alphaMul:.16},{widthMul:1,alphaMul:.5},{widthMul:.45,alphaMul:1}];function f(e,t){const n=document.createElement("canvas");n.id=c+(h.length>0?`-${h.length}`:""),n.setAttribute("data-domma-effect","strobe"),n.style.pointerEvents="none",n.style.zIndex=o.zIndex,t?(n.style.position="fixed",n.style.top="0",n.style.left="0",n.style.width="100%",n.style.height="100%",n.width=window.innerWidth,n.height=window.innerHeight,document.body.appendChild(n)):("static"===window.getComputedStyle(e).position&&(e.style.position="relative"),n.style.position="absolute",n.style.top="0",n.style.left="0",n.style.width="100%",n.style.height="100%",n.width=e.offsetWidth||e.getBoundingClientRect().width,n.height=e.offsetHeight||e.getBoundingClientRect().height,e.appendChild(n));const s=n.getContext("2d");return{canvas:n,ctx:s,container:e,beams:p()}}function g(e){if(e.isFixed)e.canvas.width=window.innerWidth,e.canvas.height=window.innerHeight;else{const t=e.container.getBoundingClientRect();e.canvas.width=t.width||e.container.offsetWidth,e.canvas.height=t.height||e.container.offsetHeight}}if(s){const e=f(document.body,!0);e.isFixed=!0,h.push(e);const t=()=>h.forEach(e=>g(e));window.addEventListener("resize",t),h[0]._resizeHandler=t}else i.forEach(e=>{const t=f(e,!1);t.isFixed=!1,h.push(t)}),"undefined"!=typeof ResizeObserver&&(u=new ResizeObserver(()=>h.forEach(e=>g(e))),i.forEach(e=>u.observe(e)));function v(){if(!r||a)return;let e=1;if(o.flicker){const t=.5+.5*Math.sin(("undefined"!=typeof performance&&performance.now?performance.now():Date.now())/1e3*o.hz*Math.PI*2);e=.4+.6*t}h.forEach(t=>{const{canvas:n,ctx:s,beams:i}=t,r=n.width,a=n.height;s.globalCompositeOperation="destination-out",s.fillStyle="rgba(0, 0, 0, 0.14)",s.fillRect(0,0,r,a),s.globalCompositeOperation="lighter";const l=r/2,d=a/2;i.forEach(t=>{const{x:n,y:i}=function(e,t,n){switch(e){case"tr":return{x:t,y:0};case"bl":return{x:0,y:n};case"br":return{x:t,y:n};default:return{x:0,y:0}}}(t.corner,r,a);let c;if("rotate"===o.motion)c=t.phase,t.phase+=.01*o.speed;else{c=Math.atan2(d-i,l-n)+Math.sin(t.phase)*(o.sweepArc*Math.PI/180)/2,t.phase+=.02*o.speed}!function(e,t,n,s,i,r,a,l){const d=1.5*Math.hypot(r,a),c=o.beamWidth*Math.PI/180/2;for(let r=0;r<m.length;r++){const a=m[r],h=c*a.widthMul,u=o.intensity*a.alphaMul*l;if(u<=.003)continue;const p=t+Math.cos(s-h)*d,f=n+Math.sin(s-h)*d,g=t+Math.cos(s+h)*d,v=n+Math.sin(s+h)*d,y=e.createRadialGradient(t,n,0,t,n,d);y.addColorStop(0,Jo(i,u)),y.addColorStop(.4,Jo(i,.4*u)),y.addColorStop(1,Jo(i,0)),e.fillStyle=y,e.beginPath(),e.moveTo(t,n),e.lineTo(p,f),e.lineTo(g,v),e.closePath(),e.fill()}}(s,n,i,c,t.colour,r,a,e)}),s.globalCompositeOperation="source-over"}),l=requestAnimationFrame(v)}function y(){r||(r=!0,a=!1,v(),o.duration&&(d=setTimeout(()=>b.stop(),o.duration)))}const b={pause(){r&&!a&&(a=!0,l&&(cancelAnimationFrame(l),l=null))},resume(){r&&a&&(a=!1,v())},stop(){r=!1,a=!1,l&&(cancelAnimationFrame(l),l=null),d&&(clearTimeout(d),d=null),h.forEach(({canvas:e,ctx:t})=>t&&t.clearRect(0,0,e.width,e.height))},restart(){this.stop(),h.forEach(e=>{e.beams=p()}),y()},destroy(){this.stop(),s&&h[0]?._resizeHandler&&window.removeEventListener("resize",h[0]._resizeHandler),u&&(u.disconnect(),u=null),h.forEach(({canvas:e})=>{e&&e.parentNode&&e.parentNode.removeChild(e)}),h.length=0},isRunning:()=>r&&!a,isPaused:()=>r&&a};return y(),console.log(`[Domma.effects.strobe] Initialised (${s?"full-page":"container"} mode, preset: ${o.preset})`),b}};const es={_configs:new Map,_components:new Map,_eventHandlers:new Map,_initCallbacks:[],_domReady:!1,_autoWrap:!0,process(e,t={}){if(!e||"object"!=typeof e)return;(void 0!==t.autoWrap?t.autoWrap:this._autoWrap)&&!this._domReady&&"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{this._domReady=!0,this._processConfig(e)},{once:!0}):this._processConfig(e)},_processConfig(e){e.$init&&"function"==typeof e.$init&&(this._initCallbacks.push(e.$init),e.$init(),delete e.$init),Object.keys(e).forEach(t=>{const n=e[t];if(this._configs.set(t,c.cloneDeep(n)),n.init&&"function"==typeof n.init){const e=l(t);n.init.call(e,e)}const o=l(t);if(n.component){const e=this.initComponent(t,n.component,n.options||{});e&&this._components.set(t,e)}n.initial&&this.applyProperties(o,n.initial),n.events&&this.bindEvents(t,n.events,!0)})},update(e,t){const n=this._configs.get(e);if(!n)return this.process({[e]:t}),this._configs.get(e);const o=c.merge({},n,t);this._configs.set(e,o);const s=l(e);if(t.options&&this._components.has(e)){const n=this._components.get(e);n&&"function"==typeof n.setOptions&&n.setOptions(t.options)}return t.initial&&this.applyProperties(s,t.initial),t.events&&this.updateEvents(e,t.events),o},config(e){if(!e){const e={};return this._configs.forEach((t,n)=>{e[n]=t}),e}return this._configs.get(e)||null},getComponent(e){return e?this._components.get(e)||null:new Map(this._components)},reset(e){if(!e){return void Array.from(this._configs.keys()).forEach(e=>this.reset(e))}const t=this._components.get(e);t&&"function"==typeof t.destroy&&t.destroy(),this._components.delete(e),this.unbindEvents(e),this._configs.delete(e)},initComponent(e,t,n){const o={card:Y.card,modal:Y.modal,tabs:Y.tabs,accordion:Y.accordion,tooltip:Y.tooltip,carousel:Y.carousel,dropdown:Y.dropdown,badge:Y.badge,numberBadge:Y.numberBadge,listGroup:Y.listGroup,cookieConsent:Y.cookieConsent,backToTop:Y.backToTop,buttonGroup:Y.buttonGroup,loader:Y.loader,breadcrumbs:Y.breadcrumbs,navbar:Y.navbar,sidebar:Y.sidebar,footer:Y.footer,notification:Y.notification,timer:Y.timer,alarm:Y.alarm,autocomplete:Y.autocomplete,pillbox:Y.pillbox,signature:Y.signature,form:qo.create,breathe:Qo.breathe,pulse:Qo.pulse,scribe:Qo.scribe}[t];if(o){if("form"===t){if(!n.schema)return console.error("Forms component requires a schema option"),null;const t=o(n.schema,n.data||{},n);return t.renderTo(e),t}return o.call(Y,e,n)}console.warn(`Unknown component type: ${t}`)},applyProperties(e,t){Object.keys(t).forEach(n=>{"css"===n?e.css(t[n]):"text"===n?e.text(t[n]):"html"===n?e.html(t[n]):"addClass"===n?e.addClass(t[n]):"removeClass"===n?e.removeClass(t[n]):"toggleClass"===n?e.toggleClass(t[n]):"attr"===n&&Object.keys(t[n]).forEach(o=>{e.attr(o,t[n][o])})})},bindEvents(e,t,n=!1){const o=l(e);n&&!this._eventHandlers.has(e)&&this._eventHandlers.set(e,new Map),Object.keys(t).forEach(s=>{const i=t[s],r=e=>this.executeActions(e,i);o.on(s,r),n&&this._eventHandlers.get(e).set(s,r)})},unbindEvents(e){const t=this._eventHandlers.get(e);if(!t)return;const n=l(e);t.forEach((e,t)=>{n.off(t,e)}),this._eventHandlers.delete(e)},updateEvents(e,t){const n=this._eventHandlers.get(e),o=l(e);n&&Object.keys(t).forEach(e=>{n.has(e)&&(o.off(e,n.get(e)),n.delete(e))}),this.bindEvents(e,t,!0)},executeActions(e,t){if("function"==typeof t)return void t.call(e.target,e,l(e.target));const n=Array.isArray(t)?t:[t],o=l(e.target);n.forEach(t=>{if("function"==typeof t)return void t.call(e.target,e,o);const n=t.target?l(t.target):o;t.css&&n.css(t.css),t.text&&n.text(t.text),t.html&&n.html(t.html),t.addClass&&n.addClass(t.addClass),t.removeClass&&n.removeClass(t.removeClass),t.toggleClass&&n.toggleClass(t.toggleClass),t.log&&console.log(t.log)})},ready(e){"function"==typeof e?this._domReady||"complete"===document.readyState||"interactive"===document.readyState?e():document.addEventListener("DOMContentLoaded",()=>{this._domReady=!0,e()},{once:!0}):console.warn("ready() requires a function")}},ts=1e3,ns=6e4,os=36e5,ss=864e5,is=6048e5,rs=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],as=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],ls=["January","February","March","April","May","June","July","August","September","October","November","December"],ds=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];class cs{constructor(e){e instanceof cs?this._date=new Date(e._date):e instanceof Date?this._date=new Date(e):this._date="string"==typeof e||"number"==typeof e?new Date(e):null==e?new Date:new Date(e)}add(e,t){const n=this._normalizeUnit(t),o=this._date;return"years"===n?o.setFullYear(o.getFullYear()+e):"months"===n?o.setMonth(o.getMonth()+e):"weeks"===n?o.setDate(o.getDate()+7*e):"days"===n?o.setDate(o.getDate()+e):"hours"===n?o.setHours(o.getHours()+e):"minutes"===n?o.setMinutes(o.getMinutes()+e):"seconds"===n?o.setSeconds(o.getSeconds()+e):"milliseconds"===n&&o.setMilliseconds(o.getMilliseconds()+e),this}subtract(e,t){return this.add(-e,t)}startOf(e){const t=this._normalizeUnit(e),n=this._date;return"years"===t||"year"===t?(n.setMonth(0,1),n.setHours(0,0,0,0)):"months"===t||"month"===t?(n.setDate(1),n.setHours(0,0,0,0)):"weeks"===t||"week"===t?(n.setDate(n.getDate()-n.getDay()),n.setHours(0,0,0,0)):"days"===t||"day"===t?n.setHours(0,0,0,0):"hours"===t||"hour"===t?n.setMinutes(0,0,0):"minutes"===t||"minute"===t?n.setSeconds(0,0):"seconds"!==t&&"second"!==t||n.setMilliseconds(0),this}endOf(e){const t=this._normalizeUnit(e),n=this._date;return"years"===t||"year"===t?(n.setMonth(11,31),n.setHours(23,59,59,999)):"months"===t||"month"===t?(n.setMonth(n.getMonth()+1,0),n.setHours(23,59,59,999)):"weeks"===t||"week"===t?(n.setDate(n.getDate()+(6-n.getDay())),n.setHours(23,59,59,999)):"days"===t||"day"===t?n.setHours(23,59,59,999):"hours"===t||"hour"===t?n.setMinutes(59,59,999):"minutes"===t||"minute"===t?n.setSeconds(59,999):"seconds"!==t&&"second"!==t||n.setMilliseconds(999),this}set(e,t){const n=this._normalizeUnit(e),o=this._date;return"years"===n||"year"===n?o.setFullYear(t):"months"===n||"month"===n?o.setMonth(t):"days"===n||"day"===n||"date"===n?o.setDate(t):"hours"===n||"hour"===n?o.setHours(t):"minutes"===n||"minute"===n?o.setMinutes(t):"seconds"===n||"second"===n?o.setSeconds(t):"milliseconds"!==n&&"millisecond"!==n||o.setMilliseconds(t),this}get(e){if(!e)return this._date;const t=this._normalizeUnit(e),n=this._date;return"years"===t||"year"===t?n.getFullYear():"months"===t||"month"===t?n.getMonth():"days"===t||"day"===t?n.getDay():"date"===t?n.getDate():"hours"===t||"hour"===t?n.getHours():"minutes"===t||"minute"===t?n.getMinutes():"seconds"===t||"second"===t?n.getSeconds():"milliseconds"===t||"millisecond"===t?n.getMilliseconds():this._date}year(){return this._date.getFullYear()}month(){return this._date.getMonth()}date(){return this._date.getDate()}day(){return this._date.getDay()}hour(){return this._date.getHours()}minute(){return this._date.getMinutes()}second(){return this._date.getSeconds()}millisecond(){return this._date.getMilliseconds()}dayOfYear(){const e=new Date(this._date.getFullYear(),0,0),t=this._date-e;return Math.floor(t/864e5)}week(){const e=new Date(this._date.getFullYear(),0,1),t=this._date-e;return Math.ceil(t/6048e5+e.getDay()/7)}quarter(){return Math.floor(this._date.getMonth()/3)+1}unix(){return Math.floor(this._date.getTime()/1e3)}valueOf(){return this._date.getTime()}format(e="YYYY-MM-DD HH:mm:ss"){const t=this._date,n=t.getFullYear(),o=t.getMonth(),s=t.getDate(),i=t.getDay(),r=t.getHours(),a=t.getMinutes(),l=t.getSeconds(),d=t.getMilliseconds(),c=r%12||12,h=(e,t=2)=>String(e).padStart(t,"0"),u={YYYY:n,YY:String(n).slice(-2),MMMM:ls[o],MMM:ds[o],MM:h(o+1),M:o+1,dddd:rs[i],ddd:as[i],DD:h(s),D:s,HH:h(r),H:r,hh:h(c),h:c,mm:h(a),m:a,ss:h(l),s:l,SSS:h(d,3),A:r<12?"AM":"PM",a:r<12?"am":"pm"},p=Object.keys(u).sort((e,t)=>t.length-e.length),m=new RegExp(p.join("|"),"g");return e.replace(m,e=>u[e])}toISOString(){return this._date.toISOString()}toDate(){return new Date(this._date)}toString(){return this._date.toString()}fromNow(e){const t=e?new cs(e)._date:new Date,n=this._date.getTime()-t.getTime(),o=Math.abs(n),s=n<0;let i,r;return o<ns?"just now":(o<os?(i=Math.floor(o/ns),r=1===i?"minute":"minutes"):o<ss?(i=Math.floor(o/os),r=1===i?"hour":"hours"):o<is?(i=Math.floor(o/ss),r=1===i?"day":"days"):o<30*ss?(i=Math.floor(o/is),r=1===i?"week":"weeks"):o<365*ss?(i=Math.floor(o/(30*ss)),r=1===i?"month":"months"):(i=Math.floor(o/(365*ss)),r=1===i?"year":"years"),s?`${i} ${r} ago`:`in ${i} ${r}`)}to(e){const t=new cs(e)._date.getTime()-this._date.getTime(),n=Math.abs(t),o=t>0;let s,i;return n<ns?"just now":(n<os?(s=Math.floor(n/ns),i=1===s?"minute":"minutes"):n<ss?(s=Math.floor(n/os),i=1===s?"hour":"hours"):n<is?(s=Math.floor(n/ss),i=1===s?"day":"days"):n<30*ss?(s=Math.floor(n/is),i=1===s?"week":"weeks"):n<365*ss?(s=Math.floor(n/(30*ss)),i=1===s?"month":"months"):(s=Math.floor(n/(365*ss)),i=1===s?"year":"years"),o?`in ${s} ${i}`:`${s} ${i} ago`)}isBefore(e,t){const n=new cs(e);return t?this.clone().endOf(t).valueOf()<n.clone().startOf(t).valueOf():this._date.getTime()<n._date.getTime()}isAfter(e,t){const n=new cs(e);return t?this.clone().startOf(t).valueOf()>n.clone().endOf(t).valueOf():this._date.getTime()>n._date.getTime()}isSame(e,t){const n=new cs(e);if(!t)return this._date.getTime()===n._date.getTime();const o=this.clone().startOf(t).valueOf(),s=this.clone().endOf(t).valueOf(),i=n.valueOf();return i>=o&&i<=s}isBetween(e,t,n,o="()"){const s=new cs(e),i=new cs(t);let r,a,l;n?(r=s.clone().startOf(n).valueOf(),a=i.clone().endOf(n).valueOf(),l=this.clone().startOf(n).valueOf()):(r=s.valueOf(),a=i.valueOf(),l=this.valueOf());const d="["===o[0],c="]"===o[1];return(d?l>=r:l>r)&&(c?l<=a:l<a)}diff(e,t="milliseconds",n=!1){const o=new cs(e),s=this._date.getTime()-o._date.getTime(),i=this._normalizeUnit(t);let r;return r="milliseconds"===i?s:"seconds"===i?s/ts:"minutes"===i?s/ns:"hours"===i?s/os:"days"===i?s/ss:"weeks"===i?s/is:"months"===i?this._monthDiff(o):"years"===i?this._monthDiff(o)/12:s,n?r:Math.floor(r)}_monthDiff(e){const t=this._date,n=e._date;return 12*(t.getFullYear()-n.getFullYear())+(t.getMonth()-n.getMonth())}isValid(){return!isNaN(this._date.getTime())}isLeapYear(){const e=this._date.getFullYear();return e%4==0&&e%100!=0||e%400==0}daysInMonth(){return new Date(this._date.getFullYear(),this._date.getMonth()+1,0).getDate()}clone(){return new cs(this._date)}_normalizeUnit(e){if(!e)return e;const t=String(e).toLowerCase().trim();return"year"===t?"years":"month"===t?"months":"week"===t?"weeks":"day"===t?"days":"hour"===t?"hours":"minute"===t?"minutes":"second"===t?"seconds":"millisecond"===t?"milliseconds":t}}const hs=function(e){return new cs(e)};Object.assign(hs,{now:()=>Date.now(),parse(e,t){if(!t)return new cs(e);const n={YYYY:{regex:"(\\d{4})",setter:"year"},YY:{regex:"(\\d{2})",setter:"year",transform:e=>2e3+parseInt(e)},MM:{regex:"(\\d{2})",setter:"month",transform:e=>parseInt(e)-1},M:{regex:"(\\d{1,2})",setter:"month",transform:e=>parseInt(e)-1},DD:{regex:"(\\d{2})",setter:"date"},D:{regex:"(\\d{1,2})",setter:"date"},HH:{regex:"(\\d{2})",setter:"hour"},H:{regex:"(\\d{1,2})",setter:"hour"},mm:{regex:"(\\d{2})",setter:"minute"},m:{regex:"(\\d{1,2})",setter:"minute"},ss:{regex:"(\\d{2})",setter:"second"},s:{regex:"(\\d{1,2})",setter:"second"}};let o=t;const s=[],i=Object.keys(n).sort((e,t)=>t.length-e.length);for(const e of i)if(t.includes(e)){-1!==o.indexOf(e)&&(o=o.replace(e,n[e].regex),s.push({token:e,...n[e]}))}o=o.replace(/[-\/\\^$*+?.()|[\]{}]/g,e=>"("===e||")"===e?e:"\\"+e);try{const t=new RegExp("^"+o+"$"),n=e.match(t);if(!n)return new cs(NaN);const i=new cs;i.set("hour",0).set("minute",0).set("second",0).set("millisecond",0);for(let e=0;e<s.length;e++){let t=parseInt(n[e+1]);s[e].transform&&(t=s[e].transform(n[e+1])),i.set(s[e].setter,t)}return i}catch(e){return new cs(NaN)}},isValid:e=>new cs(e).isValid(),min(...e){const t=e.flat().map(e=>new cs(e));let n=t[0];for(let e=1;e<t.length;e++)t[e].valueOf()<n.valueOf()&&(n=t[e]);return n},max(...e){const t=e.flat().map(e=>new cs(e));let n=t[0];for(let e=1;e<t.length;e++)t[e].valueOf()>n.valueOf()&&(n=t[e]);return n},tokens:{YYYY:"Full year (2025)",YY:"Short year (25)",MM:"Month 01-12",M:"Month 1-12",DD:"Day 01-31",D:"Day 1-31",HH:"Hour 00-23",H:"Hour 0-23",hh:"Hour 01-12",h:"Hour 1-12",mm:"Minute 00-59",m:"Minute 0-59",ss:"Second 00-59",s:"Second 0-59",SSS:"Milliseconds",A:"AM/PM",a:"am/pm",ddd:"Day name short (Mon)",dddd:"Day name full (Monday)",MMM:"Month name short (Jan)",MMMM:"Month name full (January)"}});const us={"arrow-up":{viewBox:"0 0 24 24",path:"M12 19V5M5 12l7-7 7 7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"arrow-down":{viewBox:"0 0 24 24",path:"M12 5v14M19 12l-7 7-7-7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"arrow-left":{viewBox:"0 0 24 24",path:"M19 12H5M12 19l-7-7 7-7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"arrow-right":{viewBox:"0 0 24 24",path:"M5 12h14M12 5l7 7-7 7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"arrow-up-left":{viewBox:"0 0 24 24",path:"M17 17L7 7M7 17V7h10",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"arrow-up-right":{viewBox:"0 0 24 24",path:"M7 17L17 7M7 7h10v10",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"arrow-down-left":{viewBox:"0 0 24 24",path:"M17 7L7 17M17 17H7V7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"arrow-down-right":{viewBox:"0 0 24 24",path:"M7 7l10 10M17 7v10H7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},menu:{viewBox:"0 0 24 24",paths:["M3 6h18","M3 12h18","M3 18h18"],stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round"},"menu-alt":{viewBox:"0 0 24 24",paths:["M3 6h18","M3 12h12","M3 18h18"],stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round"},"dots-horizontal":{viewBox:"0 0 24 24",paths:["M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0","M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0","M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"],fill:"currentColor"},"dots-vertical":{viewBox:"0 0 24 24",paths:["M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0","M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0","M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"],fill:"currentColor"},grid:{viewBox:"0 0 24 24",path:"M3 3h7v7H3zM14 3h7v7h-7zM14 14h7v7h-7zM3 14h7v7H3z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},list:{viewBox:"0 0 24 24",paths:["M8 6h13","M8 12h13","M8 18h13","M3 6h.01","M3 12h.01","M3 18h.01"],stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},columns:{viewBox:"0 0 24 24",path:"M12 3v18M3 3h18v18H3V3z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},layout:{viewBox:"0 0 24 24",path:"M4 3h16a1 1 0 011 1v16a1 1 0 01-1 1H4a1 1 0 01-1-1V4a1 1 0 011-1zM9 21V9m12-6H3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},close:{viewBox:"0 0 24 24",path:"M18 6L6 18M6 6l12 12",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},plus:{viewBox:"0 0 24 24",path:"M12 5v14M5 12h14",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},minus:{viewBox:"0 0 24 24",path:"M5 12h14",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"plus-circle":{viewBox:"0 0 24 24",path:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10zM12 8v8M8 12h8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"minus-circle":{viewBox:"0 0 24 24",path:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10zM8 12h8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"plus-square":{viewBox:"0 0 24 24",path:"M5 3h14a2 2 0 012 2v14a2 2 0 01-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2zM12 8v8M8 12h8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"minus-square":{viewBox:"0 0 24 24",path:"M5 3h14a2 2 0 012 2v14a2 2 0 01-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2zM8 12h8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},search:{viewBox:"0 0 24 24",path:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},refresh:{viewBox:"0 0 24 24",path:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},edit:{viewBox:"0 0 24 24",path:"M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"edit-2":{viewBox:"0 0 24 24",path:"M17 3a2.85 2.85 0 114 4L7.5 20.5 2 22l1.5-5.5z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"edit-3":{viewBox:"0 0 24 24",path:"M12 20h9M16.5 3.5a2.121 2.121 0 013 3L7 19l-4 1 1-4z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},trash:{viewBox:"0 0 24 24",path:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filter:{viewBox:"0 0 24 24",path:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},sort:{viewBox:"0 0 24 24",paths:["M3 6h7","M3 12h5","M3 18h3","M16 6l4 4-4 4","M20 10H10"],stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},home:{viewBox:"0 0 24 24",path:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},user:{viewBox:"0 0 24 24",path:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},users:{viewBox:"0 0 24 24",path:"M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2M9 11a4 4 0 100-8 4 4 0 000 8zM23 21v-2a4 4 0 00-3-3.87M16 3.13a4 4 0 010 7.75",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},settings:{viewBox:"0 0 24 24",path:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065zM15 12a3 3 0 11-6 0 3 3 0 016 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},cog:{viewBox:"0 0 24 24",path:"M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},tool:{viewBox:"0 0 24 24",path:"M14.7 6.3a1 1 0 000 1.4l1.6 1.6a1 1 0 001.4 0l3.77-3.77a6 6 0 01-7.94 7.94l-6.91 6.91a2.12 2.12 0 01-3-3l6.91-6.91a6 6 0 017.94-7.94l-3.76 3.76z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},eye:{viewBox:"0 0 24 24",path:"M15 12a3 3 0 11-6 0 3 3 0 016 0z M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"eye-off":{viewBox:"0 0 24 24",path:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},lock:{viewBox:"0 0 24 24",path:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},unlock:{viewBox:"0 0 24 24",path:"M8 11V7a4 4 0 118 0m-4 8v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},clock:{viewBox:"0 0 24 24",path:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},calendar:{viewBox:"0 0 24 24",path:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},star:{viewBox:"0 0 24 24",path:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"star-filled":{viewBox:"0 0 24 24",path:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z",fill:"currentColor"},sun:{viewBox:"0 0 24 24",path:"M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},moon:{viewBox:"0 0 24 24",path:"M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},globe:{viewBox:"0 0 24 24",path:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},map:{viewBox:"0 0 24 24",path:"M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},pin:{viewBox:"0 0 24 24",path:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z M15 11a3 3 0 11-6 0 3 3 0 016 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},feather:{viewBox:"0 0 24 24",path:"M20.24 12.24a6 6 0 00-8.49-8.49L5 10.5V19h8.5zM16 8L2 22M17.5 15H9",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},palette:{viewBox:"0 0 24 24",path:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10c.93 0 1.68-.75 1.68-1.68 0-.43-.16-.84-.44-1.13-.27-.29-.43-.7-.43-1.13 0-.93.76-1.69 1.69-1.69h1.98c3.03 0 5.52-2.49 5.52-5.52C22 6.48 17.52 2 12 2zm-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 8 6.5 8 8 8.67 8 9.5 7.33 11 6.5 11zm3-4C8.67 7 8 6.33 8 5.5S8.67 4 9.5 4s1.5.67 1.5 1.5S10.33 7 9.5 7zm5 0c-.83 0-1.5-.67-1.5-1.5S13.67 4 14.5 4s1.5.67 1.5 1.5S15.33 7 14.5 7zm3 4c-.83 0-1.5-.67-1.5-1.5S16.67 8 17.5 8s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z",fill:"currentColor"},type:{viewBox:"0 0 24 24",path:"M4 7V4h16v3M9 20h6M12 4v16",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},square:{viewBox:"0 0 24 24",path:"M5 3h14a2 2 0 012 2v14a2 2 0 01-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"mouse-pointer":{viewBox:"0 0 24 24",path:"M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z M13 13l6 6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"refresh-cw":{viewBox:"0 0 24 24",path:"M23 4v6h-6M1 20v-6h6M3.51 9a9 9 0 0114.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0020.49 15",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},sync:{viewBox:"0 0 24 24",path:"M1 4v6h6m16 10v-6h-6M2 20l6-6M22 4l-6 6M9 12l2 2 4-4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},gauge:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 0110 10c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2z M8 12l4 4 4-4M12 16V8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"map-pin":{viewBox:"0 0 24 24",path:"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0118 0z M12 13a3 3 0 100-6 3 3 0 000 6z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"help-circle":{viewBox:"0 0 24 24",path:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z M9.09 9a3 3 0 015.83 1c0 2-3 3-3 3 M12 17h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},sliders:{viewBox:"0 0 24 24",path:"M4 21v-7m0-4V3m8 18v-9m0-4V3m8 18v-5m0-4V3M1 14h6m2-6h6m2 8h6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"user-check":{viewBox:"0 0 24 24",path:"M16 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2m16-13l2 2 4-4M13 7a4 4 0 11-8 0 4 4 0 018 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},component:{viewBox:"0 0 24 24",path:"M21 16V8a2 2 0 00-1-1.73l-7-4a2 2 0 00-2 0l-7 4A2 2 0 003 8v8a2 2 0 001 1.73l7 4a2 2 0 002 0l7-4A2 2 0 0021 16zM3.27 6.96L12 12.01l8.73-5.05M12 22.08V12",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},phone:{viewBox:"0 0 24 24",path:"M22 16.92v3a2 2 0 01-2.18 2 19.79 19.79 0 01-8.63-3.07A19.5 19.5 0 013.07 9.8a19.79 19.79 0 01-3.07-8.64A2 2 0 012 .18h3a2 2 0 012 1.72 12.84 12.84 0 00.7 2.81 2 2 0 01-.45 2.11L6.09 7.91a16 16 0 006 6l1.27-1.27a2 2 0 012.11-.45 12.84 12.84 0 002.81.7A2 2 0 0122 14v2.92z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},mail:{viewBox:"0 0 24 24",path:"M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z M22 6l-10 7L2 6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},briefcase:{viewBox:"0 0 24 24",path:"M20 7H4a2 2 0 00-2 2v10a2 2 0 002 2h16a2 2 0 002-2V9a2 2 0 00-2-2z M16 7V5a2 2 0 00-2-2h-4a2 2 0 00-2 2v2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},building:{viewBox:"0 0 24 24",path:"M3 21h18 M5 21V5a2 2 0 012-2h10a2 2 0 012 2v16 M9 9h2 M9 13h2 M9 17h2 M13 9h2 M13 13h2 M13 17h2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"link-2":{viewBox:"0 0 24 24",path:"M15 7h3a5 5 0 015 5 5 5 0 01-5 5h-3m-6 0H6a5 5 0 01-5-5 5 5 0 015-5h3 M8 12h8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"at-sign":{viewBox:"0 0 24 24",path:"M16 12a4 4 0 11-8 0 4 4 0 018 0z M16 8v5a3 3 0 006 0v-1a10 10 0 10-3.92 7.94",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},heart:{viewBox:"0 0 24 24",path:"M20.84 4.61a5.5 5.5 0 00-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 00-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 000-7.78z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"heart-filled":{viewBox:"0 0 24 24",path:"M20.84 4.61a5.5 5.5 0 00-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 00-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 000-7.78z",stroke:"currentColor",fill:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},cake:{viewBox:"0 0 24 24",path:"M20 21H4a2 2 0 01-2-2v-4a2 2 0 012-2h16a2 2 0 012 2v4a2 2 0 01-2 2z M8 13V9 M12 13V9 M16 13V9 M8 9a1 1 0 010-2 1 1 0 010 2z M12 9a1 1 0 010-2 1 1 0 010 2z M16 9a1 1 0 010-2 1 1 0 010 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},sidebar:{viewBox:"0 0 24 24",path:"M19 3H5a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2V5a2 2 0 00-2-2z M9 3v18",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},window:{viewBox:"0 0 24 24",path:"M20 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V6a2 2 0 00-2-2z M2 9h20 M5.5 6.5h.01 M8 6.5h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}},ps={mail:{viewBox:"0 0 24 24",path:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"mail-open":{viewBox:"0 0 24 24",path:"M3 19V9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v10a2 2 0 01-2 2H5a2 2 0 01-2-2z M3 9l9 6 9-6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},inbox:{viewBox:"0 0 24 24",path:"M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},send:{viewBox:"0 0 24 24",path:"M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},phone:{viewBox:"0 0 24 24",path:"M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"phone-incoming":{viewBox:"0 0 24 24",path:"M14.5 2v6m0 0h6m-6 0l7-7M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"phone-outgoing":{viewBox:"0 0 24 24",path:"M21.5 2h-6m6 0v6m0-6l-7 7M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"phone-off":{viewBox:"0 0 24 24",path:"M16.5 10.5l5.5-5.5M22 5l-5.5 5.5M10.68 13.31a16 16 0 003.41 2.6l1.27-1.27a2 2 0 012.11-.45 12.84 12.84 0 002.81.7 2 2 0 011.72 2v3a2 2 0 01-2.18 2 19.79 19.79 0 01-8.63-3.07 19.42 19.42 0 01-6-6 19.79 19.79 0 01-3.07-8.67A2 2 0 014.11 2h3a2 2 0 012 1.72 12.84 12.84 0 00.7 2.81 2 2 0 01-.45 2.11L8.09 9.91",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},chat:{viewBox:"0 0 24 24",path:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"chat-alt":{viewBox:"0 0 24 24",path:"M17 8h2a2 2 0 012 2v6a2 2 0 01-2 2h-2v4l-4-4H9a1.994 1.994 0 01-1.414-.586m0 0L11 14h4a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2v4l.586-.586z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"message-circle":{viewBox:"0 0 24 24",path:"M21 11.5a8.38 8.38 0 01-.9 3.8 8.5 8.5 0 01-7.6 4.7 8.38 8.38 0 01-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 01-.9-3.8 8.5 8.5 0 014.7-7.6 8.38 8.38 0 013.8-.9h.5a8.48 8.48 0 018 8v.5z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"message-square":{viewBox:"0 0 24 24",path:"M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},bell:{viewBox:"0 0 24 24",path:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"bell-off":{viewBox:"0 0 24 24",path:"M13.73 21a2 2 0 01-3.46 0M18.63 13A17.89 17.89 0 0118 8M6.26 6.26A5.86 5.86 0 006 8c0 7-3 9-3 9h14M18 8a6 6 0 00-9.33-5M1 1l22 22",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},notification:{viewBox:"0 0 24 24",path:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2zm6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5v6z",fill:"currentColor"},"at-sign":{viewBox:"0 0 24 24",path:"M16 12a4 4 0 10-8 0 4 4 0 008 0zm0 0v1.5a2.5 2.5 0 005 0V12a9 9 0 10-9 9",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},paperclip:{viewBox:"0 0 24 24",path:"M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},rss:{viewBox:"0 0 24 24",path:"M4 11a9 9 0 0 1 9 9M4 4a16 16 0 0116 16M5 20a1 1 0 100-2 1 1 0 000 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},wifi:{viewBox:"0 0 24 24",path:"M12 20h.01M2 8.82a15 15 0 0120 0M5 12.859a10 10 0 0114 0M8.5 16.429a5 5 0 017 0",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"wifi-off":{viewBox:"0 0 24 24",path:"M1 1l22 22M16.72 11.06A10.94 10.94 0 0119 12.55M5 12.55a10.94 10.94 0 015.17-2.39m3.64.46a10.88 10.88 0 012.69 1.92M8.5 16.429a5 5 0 013.5-1.43M12 20h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}},ms={play:{viewBox:"0 0 24 24",path:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z M21 12a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"play-filled":{viewBox:"0 0 24 24",path:"M5 3l14 9-14 9V3z",fill:"currentColor"},pause:{viewBox:"0 0 24 24",path:"M10 9v6m4-6v6m7-3a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"pause-filled":{viewBox:"0 0 24 24",paths:["M6 4h4v16H6z","M14 4h4v16h-4z"],fill:"currentColor"},stop:{viewBox:"0 0 24 24",path:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z M9 10a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-4z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"stop-filled":{viewBox:"0 0 24 24",path:"M6 6h12v12H6z",fill:"currentColor"},"skip-back":{viewBox:"0 0 24 24",path:"M19 20L9 12l10-8v16zM5 19V5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"skip-forward":{viewBox:"0 0 24 24",path:"M5 4l10 8-10 8V4zM19 5v14",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},rewind:{viewBox:"0 0 24 24",path:"M11 19l-7-7 7-7m8 14l-7-7 7-7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"fast-forward":{viewBox:"0 0 24 24",path:"M13 5l7 7-7 7M5 5l7 7-7 7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},volume:{viewBox:"0 0 24 24",path:"M15.536 8.464a5 5 0 010 7.072M12 6l-4 4H4v4h4l4 4V6z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"volume-up":{viewBox:"0 0 24 24",path:"M15.536 8.464a5 5 0 010 7.072m2.828-9.9a9 9 0 010 12.728M12 6l-4 4H4v4h4l4 4V6z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"volume-down":{viewBox:"0 0 24 24",path:"M15.536 8.464a5 5 0 010 7.072M12 6l-4 4H4v4h4l4 4V6z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"volume-mute":{viewBox:"0 0 24 24",path:"M5.586 15H4a1 1 0 01-1-1v-4a1 1 0 011-1h1.586l4.707-4.707C10.923 3.663 12 4.109 12 5v14c0 .891-1.077 1.337-1.707.707L5.586 15z M17 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"volume-off":{viewBox:"0 0 24 24",path:"M12 6l-4 4H4v4h4l4 4V6z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},camera:{viewBox:"0 0 24 24",path:"M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z M15 13a3 3 0 11-6 0 3 3 0 016 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"camera-off":{viewBox:"0 0 24 24",path:"M1 1l22 22M21 21H3a2 2 0 01-2-2V8a2 2 0 012-2h3m3-3h6l2 3h4a2 2 0 012 2v9.34m-7.72-2.06a4 4 0 11-5.56-5.56",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},video:{viewBox:"0 0 24 24",path:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"video-off":{viewBox:"0 0 24 24",path:"M16 16v1a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h2m5.66 0H14a2 2 0 012 2v3.34l1 1L23 7v10M1 1l22 22",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},image:{viewBox:"0 0 24 24",path:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},images:{viewBox:"0 0 24 24",path:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z M9 3h12a2 2 0 012 2v12",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},music:{viewBox:"0 0 24 24",path:"M9 19V6l12-3v13M9 19c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zm12-3c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zM9 10l12-3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},mic:{viewBox:"0 0 24 24",path:"M19 10v2a7 7 0 01-14 0v-2m7 9v4m-4 0h8m-4-13a3 3 0 00-3 3v4a3 3 0 006 0v-4a3 3 0 00-3-3z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"mic-off":{viewBox:"0 0 24 24",path:"M1 1l22 22m-2-2a10 10 0 01-11 2.955M12 19v4m-4 0h8M9 9v3a3 3 0 005.12 2.12M15 9.34V4a3 3 0 00-5.94-.6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},headphones:{viewBox:"0 0 24 24",path:"M3 18v-6a9 9 0 0118 0v6M21 19a2 2 0 01-2 2h-1a2 2 0 01-2-2v-3a2 2 0 012-2h3zM3 19a2 2 0 002 2h1a2 2 0 002-2v-3a2 2 0 00-2-2H3z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},radio:{viewBox:"0 0 24 24",path:"M12 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0 M16.24 7.76a6 6 0 010 8.49m-8.48-.01a6 6 0 010-8.49m11.31-2.82a10 10 0 010 14.14m-14.14 0a10 10 0 010-14.14",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},film:{viewBox:"0 0 24 24",path:"M7 4v16M17 4v16M3 8h4m10 0h4M3 12h18M3 16h4m10 0h4M4 20h16a1 1 0 001-1V5a1 1 0 00-1-1H4a1 1 0 00-1 1v14a1 1 0 001 1z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},tv:{viewBox:"0 0 24 24",path:"M20 7H4a2 2 0 00-2 2v10a2 2 0 002 2h16a2 2 0 002-2V9a2 2 0 00-2-2zM17 3l-5 4-5-4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},cast:{viewBox:"0 0 24 24",path:"M2 16.1A5 5 0 015.9 20M2 12.05A9 9 0 019.95 20M2 8V6a2 2 0 012-2h16a2 2 0 012 2v12a2 2 0 01-2 2h-6M2 20h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},maximise:{viewBox:"0 0 24 24",path:"M8 3H5a2 2 0 00-2 2v3m18 0V5a2 2 0 00-2-2h-3m0 18h3a2 2 0 002-2v-3M3 16v3a2 2 0 002 2h3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},minimise:{viewBox:"0 0 24 24",path:"M8 3v3a2 2 0 01-2 2H3m18 0h-3a2 2 0 01-2-2V3m0 18v-3a2 2 0 012-2h3M3 16h3a2 2 0 012 2v3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},maximize:{viewBox:"0 0 24 24",path:"M8 3H5a2 2 0 00-2 2v3m18 0V5a2 2 0 00-2-2h-3m0 18h3a2 2 0 002-2v-3M3 16v3a2 2 0 002 2h3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},minimize:{viewBox:"0 0 24 24",path:"M8 3v3a2 2 0 01-2 2H3m18 0h-3a2 2 0 01-2-2V3m0 18v-3a2 2 0 012-2h3M3 16h3a2 2 0 012 2v3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"maximise-2":{viewBox:"0 0 24 24",path:"M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"minimise-2":{viewBox:"0 0 24 24",path:"M4 14h6v6M20 10h-6V4M14 10l7-7M3 21l7-7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"maximize-2":{viewBox:"0 0 24 24",path:"M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"minimize-2":{viewBox:"0 0 24 24",path:"M4 14h6v6M20 10h-6V4M14 10l7-7M3 21l7-7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},scissors:{viewBox:"0 0 24 24",path:"M6 9a3 3 0 100-6 3 3 0 000 6zM6 21a3 3 0 100-6 3 3 0 000 6zM20 4L8.12 15.88M14.47 14.48L20 20M8.12 8.12L12 12",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"play-circle":{viewBox:"0 0 24 24",path:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z M10 8l6 4-6 4V8z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}},fs={document:{viewBox:"0 0 24 24",path:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"document-text":{viewBox:"0 0 24 24",path:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z M14 2v6h6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"document-add":{viewBox:"0 0 24 24",path:"M9 13h6m-3-3v6m5 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"document-remove":{viewBox:"0 0 24 24",path:"M9 13h6m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"document-check":{viewBox:"0 0 24 24",path:"M9 12l2 2 4-4m2 11H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},folder:{viewBox:"0 0 24 24",path:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"folder-open":{viewBox:"0 0 24 24",path:"M5 19a2 2 0 01-2-2V7a2 2 0 012-2h4l2 2h6a2 2 0 012 2v1M5 19h14a2 2 0 002-2v-5a2 2 0 00-2-2H9a2 2 0 00-2 2v5a2 2 0 01-2 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"folder-add":{viewBox:"0 0 24 24",path:"M9 13h6m-3-3v6M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"folder-remove":{viewBox:"0 0 24 24",path:"M9 13h6M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},download:{viewBox:"0 0 24 24",path:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},upload:{viewBox:"0 0 24 24",path:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"cloud-download":{viewBox:"0 0 24 24",path:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M9 19l3 3m0 0l3-3m-3 3V10",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"cloud-upload":{viewBox:"0 0 24 24",path:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},cloud:{viewBox:"0 0 24 24",path:"M8 19c-3.314 0-6-2.462-6-5.5S4.686 8 8 8c.642-2.87 3.251-5 6.375-5C18.086 3 21 5.91 21 9.5a6.458 6.458 0 01-.705 2.945A4.5 4.5 0 0119 21H8z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},attachment:{viewBox:"0 0 24 24",path:"M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},copy:{viewBox:"0 0 24 24",path:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},clipboard:{viewBox:"0 0 24 24",path:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"clipboard-check":{viewBox:"0 0 24 24",path:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"clipboard-list":{viewBox:"0 0 24 24",path:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},save:{viewBox:"0 0 24 24",path:"M8 7H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-3m-1 4l-3 3m0 0l-3-3m3 3V4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},archive:{viewBox:"0 0 24 24",path:"M5 8h14M5 8a2 2 0 110-4h14a2 2 0 110 4M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8m-9 4h4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"file-code":{viewBox:"0 0 24 24",path:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"file-zip":{viewBox:"0 0 24 24",path:"M17 21H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2zM10 3v4h1V3h-1zm1 4h-1v2h1V7zm-1 2v2h1V9h-1zm1 2h-1v2h1v-2zm-1 2v2h1v-2h-1z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},database:{viewBox:"0 0 24 24",path:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},server:{viewBox:"0 0 24 24",path:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"hard-drive":{viewBox:"0 0 24 24",path:"M22 12H2M5.45 5.11L2 12v6a2 2 0 002 2h16a2 2 0 002-2v-6l-3.45-6.89A2 2 0 0016.76 4H7.24a2 2 0 00-1.79 1.11zM6 16h.01M10 16h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"file-text":{viewBox:"0 0 24 24",path:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8l-6-6zM14 2v6h6M16 13H8M16 17H8M10 9H8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},book:{viewBox:"0 0 24 24",path:"M4 19.5A2.5 2.5 0 016.5 17H20M4 19.5A2.5 2.5 0 006.5 22H20v-5M6 3h14v16H6a2 2 0 01-2-2V5a2 2 0 012-2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"book-open":{viewBox:"0 0 24 24",path:"M2 3h6a4 4 0 014 4v14a3 3 0 00-3-3H2V3zM22 3h-6a4 4 0 00-4 4v14a3 3 0 013-3h7V3z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"book-closed":{viewBox:"0 0 24 24",path:"M4 19.5A2.5 2.5 0 016.5 17H20M4 19.5A2.5 2.5 0 006.5 22H20v-5M6 3h14v16H6a2 2 0 01-2-2V5a2 2 0 012-2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"folder-plus":{viewBox:"0 0 24 24",path:"M9 13h6m-3-3v6M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"folder-minus":{viewBox:"0 0 24 24",path:"M9 13h6M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}},gs={share:{viewBox:"0 0 24 24",path:"M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.368 2.684 3 3 0 00-5.368-2.684z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"share-alt":{viewBox:"0 0 24 24",path:"M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},heart:{viewBox:"0 0 24 24",path:"M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"heart-filled":{viewBox:"0 0 24 24",path:"M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z",fill:"currentColor"},bookmark:{viewBox:"0 0 24 24",path:"M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"bookmark-filled":{viewBox:"0 0 24 24",path:"M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z",fill:"currentColor"},"thumb-up":{viewBox:"0 0 24 24",path:"M14 10h4.764a2 2 0 011.789 2.894l-3.5 7A2 2 0 0115.263 21h-4.017c-.163 0-.326-.02-.485-.06L7 20m7-10V5a2 2 0 00-2-2h-.095c-.5 0-.905.405-.905.905 0 .714-.211 1.412-.608 2.006L7 11v9m7-10h-2M7 20H5a2 2 0 01-2-2v-6a2 2 0 012-2h2.5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"thumb-down":{viewBox:"0 0 24 24",path:"M10 14H5.236a2 2 0 01-1.789-2.894l3.5-7A2 2 0 018.736 3h4.018a2 2 0 01.485.06l3.76.94m-7 10v5a2 2 0 002 2h.096c.5 0 .905-.405.905-.904 0-.715.211-1.413.608-2.008L17 13V4m-7 10h2m5-10h2a2 2 0 012 2v6a2 2 0 01-2 2h-2.5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},comment:{viewBox:"0 0 24 24",path:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"user-add":{viewBox:"0 0 24 24",path:"M18 9v3m0 0v3m0-3h3m-3 0h-3m-2-5a4 4 0 11-8 0 4 4 0 018 0zM3 20a6 6 0 0112 0v1H3v-1z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"user-plus":{viewBox:"0 0 24 24",path:"M18 9v3m0 0v3m0-3h3m-3 0h-3m-2-5a4 4 0 11-8 0 4 4 0 018 0zM3 20a6 6 0 0112 0v1H3v-1z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"user-remove":{viewBox:"0 0 24 24",path:"M13 7a4 4 0 11-8 0 4 4 0 018 0zM9 14a6 6 0 00-6 6v1h12v-1a6 6 0 00-6-6zM21 12h-6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"user-group":{viewBox:"0 0 24 24",path:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"emoji-happy":{viewBox:"0 0 24 24",path:"M14.828 14.828a4 4 0 01-5.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"emoji-sad":{viewBox:"0 0 24 24",path:"M9.172 16.172a4 4 0 015.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},flag:{viewBox:"0 0 24 24",path:"M3 21v-4m0 0V5a2 2 0 012-2h6.5l1 1H21l-3 6 3 6h-8.5l-1-1H5a2 2 0 00-2 2zm9-13.5V9",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},award:{viewBox:"0 0 24 24",path:"M9 12l2 2 4-4M7.835 4.697a3.42 3.42 0 001.946-.806 3.42 3.42 0 014.438 0 3.42 3.42 0 001.946.806 3.42 3.42 0 013.138 3.138 3.42 3.42 0 00.806 1.946 3.42 3.42 0 010 4.438 3.42 3.42 0 00-.806 1.946 3.42 3.42 0 01-3.138 3.138 3.42 3.42 0 00-1.946.806 3.42 3.42 0 01-4.438 0 3.42 3.42 0 00-1.946-.806 3.42 3.42 0 01-3.138-3.138 3.42 3.42 0 00-.806-1.946 3.42 3.42 0 010-4.438 3.42 3.42 0 00.806-1.946 3.42 3.42 0 013.138-3.138z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},trophy:{viewBox:"0 0 24 24",path:"M12 15V17M8 21H16M8 3H16V9C16 11.2091 14.2091 13 12 13C9.79086 13 8 11.2091 8 9V3ZM16 5H18C19.1046 5 20 5.89543 20 7V8C20 9.10457 19.1046 10 18 10H16M8 5H6C4.89543 5 4 5.89543 4 7V8C4 9.10457 4.89543 10 6 10H8M12 17V21",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},gift:{viewBox:"0 0 24 24",path:"M12 8V21M12 8H8.464C7.103 8 6 6.897 6 5.536C6 4.175 7.103 3 8.464 3C10.059 3 11.162 4.162 12 5.536M12 8H15.536C16.897 8 18 6.897 18 5.536C18 4.175 16.897 3 15.536 3C13.941 3 12.838 4.162 12 5.536M20 12V21H4V12M3 8H21V12H3V8Z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},sparkles:{viewBox:"0 0 24 24",path:"M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},fire:{viewBox:"0 0 24 24",path:"M17.657 18.657A8 8 0 016.343 7.343S7 9 9 10c0-2 .5-5 2.986-7C14 5 16.09 5.777 17.656 7.343A7.975 7.975 0 0120 13a7.975 7.975 0 01-2.343 5.657z M9.879 16.121A3 3 0 1012.015 11L11 14H9c0 .768.293 1.536.879 2.121z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},github:{viewBox:"0 0 24 24",path:"M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z",fill:"currentColor"},twitter:{viewBox:"0 0 24 24",path:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z",fill:"currentColor"},linkedin:{viewBox:"0 0 24 24",path:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 01-2.063-2.065 2.064 2.064 0 112.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z",fill:"currentColor"},youtube:{viewBox:"0 0 24 24",path:"M23.498 6.186a3.016 3.016 0 00-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 00.502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 002.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 002.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z",fill:"currentColor"},"share-2":{viewBox:"0 0 24 24",path:"M18 8a3 3 0 100-6 3 3 0 000 6zM6 15a3 3 0 100-6 3 3 0 000 6zM18 22a3 3 0 100-6 3 3 0 000 6zM8.59 13.51l6.83 3.98M15.41 6.51l-6.82 3.98",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},facebook:{viewBox:"0 0 24 24",path:"M18 2h-3a5 5 0 00-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 011-1h3z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},instagram:{viewBox:"0 0 24 24",path:"M2 7a5 5 0 015-5h10a5 5 0 015 5v10a5 5 0 01-5 5H7a5 5 0 01-5-5zM16 11.37A4 4 0 1112.63 8 4 4 0 0116 11.37zM17.5 6.5h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}},vs={cart:{viewBox:"0 0 24 24",path:"M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"cart-add":{viewBox:"0 0 24 24",path:"M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0zm6-8v-2m0 0V7m0 2h2m-2 0H11",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"shopping-bag":{viewBox:"0 0 24 24",path:"M16 11V7a4 4 0 00-8 0v4M5 9h14l1 12H4L5 9z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},store:{viewBox:"0 0 24 24",path:"M3 3h18v4H3V3zM3 7v12a2 2 0 002 2h14a2 2 0 002-2V7M3 11h18M12 7v14M8 11v10M16 11v10",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"credit-card":{viewBox:"0 0 24 24",path:"M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},wallet:{viewBox:"0 0 24 24",path:"M17 9V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-2m-5-3h9m0 0l-3-3m3 3l-3 3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},cash:{viewBox:"0 0 24 24",path:"M17 9V7a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2m2 4h10a2 2 0 002-2v-6a2 2 0 00-2-2H9a2 2 0 00-2 2v6a2 2 0 002 2zm7-5a2 2 0 11-4 0 2 2 0 014 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"currency-dollar":{viewBox:"0 0 24 24",path:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"currency-pound":{viewBox:"0 0 24 24",path:"M15 9a3 3 0 00-3-3H9a3 3 0 00-3 3v6a3 3 0 003 3h6a3 3 0 003-3M9 12h6M21 12a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"currency-euro":{viewBox:"0 0 24 24",path:"M15 9a3 3 0 00-3-3H9a3 3 0 00-3 3v6a3 3 0 003 3h3a3 3 0 003-3M7 10h5m-5 4h5M21 12a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},tag:{viewBox:"0 0 24 24",path:"M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},tags:{viewBox:"0 0 24 24",path:"M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z M17 17l4.414-4.414a2 2 0 000-2.828L14 3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},receipt:{viewBox:"0 0 24 24",path:"M9 14l6 0M9 10l6 0M9 18l3 0M5 21l1-2 1 2 1-2 1 2 1-2 1 2 1-2 1 2 1-2 1 2 1-2 1 2V3l-1 2-1-2-1 2-1-2-1 2-1-2-1 2-1-2-1 2-1-2-1 2-1-2v18z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},barcode:{viewBox:"0 0 24 24",path:"M5 7v10M8 7v10M11 7v10M14 7v10M19 7v10M17 7v10",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round"},qrcode:{viewBox:"0 0 24 24",path:"M3 3h6v6H3V3zM15 3h6v6h-6V3zM3 15h6v6H3v-6zM15 15h2v2h-2v-2zM19 15h2v2h-2v-2zM15 19h2v2h-2v-2zM19 19h2v2h-2v-2zM5 5h2v2H5V5zM17 5h2v2h-2V5zM5 17h2v2H5v-2zM12 3h1v4h-1V3zM12 9h1v3h-1V9zM3 12h4v1H3v-1zM9 12h3v1H9v-1zM12 14h1v3h-1v-3zM12 19h1v2h-1v-2z",fill:"currentColor"},percent:{viewBox:"0 0 24 24",path:"M9 9a1.5 1.5 0 100-3 1.5 1.5 0 000 3zM15 18a1.5 1.5 0 100-3 1.5 1.5 0 000 3zM19 5L5 19",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},package:{viewBox:"0 0 24 24",path:"M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4M9 4l3 1.5L15 4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},truck:{viewBox:"0 0 24 24",path:"M13 16V6a1 1 0 00-1-1H4a1 1 0 00-1 1v10a1 1 0 001 1h1m8-1a1 1 0 01-1 1H9m4-1V8a1 1 0 011-1h2.586a1 1 0 01.707.293l3.414 3.414a1 1 0 01.293.707V16a1 1 0 01-1 1h-1m-6-1a1 1 0 001 1h1M5 17a2 2 0 104 0m-4 0a2 2 0 114 0m6 0a2 2 0 104 0m-4 0a2 2 0 114 0",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},box:{viewBox:"0 0 24 24",path:"M12 3L2 8.5V15.5L12 21L22 15.5V8.5L12 3ZM12 12V21M12 12L2 7M12 12L22 7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},shipping:{viewBox:"0 0 24 24",path:"M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2M4 7V4h16v3M4 7h16M8 4v3M16 4v3M12 11v4m-2-2h4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},calculator:{viewBox:"0 0 24 24",path:"M4 4a2 2 0 012-2h12a2 2 0 012 2v16a2 2 0 01-2 2H6a2 2 0 01-2-2V4zM8 6h8v4H8V6zM8 14h.01M12 14h.01M16 14h.01M8 18h.01M12 18h.01M16 18h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},briefcase:{viewBox:"0 0 24 24",path:"M20 7H4a2 2 0 00-2 2v10a2 2 0 002 2h16a2 2 0 002-2V9a2 2 0 00-2-2zM16 21V5a2 2 0 00-2-2h-4a2 2 0 00-2 2v16",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},gem:{viewBox:"0 0 24 24",path:"M6 3h12l4 6-10 12L2 9l4-6z M11 3L8 9l4 12 4-12-3-6 M2 9h20",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"shopping-cart":{viewBox:"0 0 24 24",path:"M9 22a1 1 0 100-2 1 1 0 000 2z M20 22a1 1 0 100-2 1 1 0 000 2z M1 1h4l2.68 13.39a2 2 0 002 1.61h9.72a2 2 0 002-1.61L23 6H6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}},ys={check:{viewBox:"0 0 24 24",path:"M5 13l4 4L19 7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"check-circle":{viewBox:"0 0 24 24",path:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"check-circle-filled":{viewBox:"0 0 24 24",path:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z",fill:"currentColor"},"check-square":{viewBox:"0 0 24 24",path:"M9 11l3 3L22 4M21 12v7a2 2 0 01-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2h11",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},x:{viewBox:"0 0 24 24",path:"M6 18L18 6M6 6l12 12",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"x-circle":{viewBox:"0 0 24 24",path:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"x-circle-filled":{viewBox:"0 0 24 24",path:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z",fill:"currentColor"},warning:{viewBox:"0 0 24 24",path:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"warning-filled":{viewBox:"0 0 24 24",path:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z",fill:"currentColor"},"alert-warning":{viewBox:"0 0 24 24",path:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},info:{viewBox:"0 0 24 24",path:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"info-filled":{viewBox:"0 0 24 24",path:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z",fill:"currentColor"},question:{viewBox:"0 0 24 24",path:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},exclamation:{viewBox:"0 0 24 24",path:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"alert-circle":{viewBox:"0 0 24 24",path:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},ban:{viewBox:"0 0 24 24",path:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},shield:{viewBox:"0 0 24 24",path:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"shield-check":{viewBox:"0 0 24 24",path:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"shield-x":{viewBox:"0 0 24 24",path:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m5.618-6.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},spinner:{viewBox:"0 0 24 24",path:"M12 2v4m0 12v4m10-10h-4M6 12H2m15.364-5.364l-2.828 2.828M9.464 14.536l-2.828 2.828m11.728 0l-2.828-2.828M9.464 9.464L6.636 6.636",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},loading:{viewBox:"0 0 24 24",path:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z",fill:"currentColor"},loader:{viewBox:"0 0 24 24",path:"M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},circle:{viewBox:"0 0 24 24",path:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"circle-filled":{viewBox:"0 0 24 24",path:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z",fill:"currentColor"},dot:{viewBox:"0 0 24 24",path:"M12 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",fill:"currentColor"},badge:{viewBox:"0 0 24 24",path:"M9 12l2 2 4-4M7.835 4.697a3.42 3.42 0 001.946-.806 3.42 3.42 0 014.438 0 3.42 3.42 0 001.946.806 3.42 3.42 0 013.138 3.138 3.42 3.42 0 00.806 1.946 3.42 3.42 0 010 4.438 3.42 3.42 0 00-.806 1.946 3.42 3.42 0 01-3.138 3.138 3.42 3.42 0 00-1.946.806 3.42 3.42 0 01-4.438 0 3.42 3.42 0 00-1.946-.806 3.42 3.42 0 01-3.138-3.138 3.42 3.42 0 00-.806-1.946 3.42 3.42 0 010-4.438 3.42 3.42 0 00.806-1.946 3.42 3.42 0 013.138-3.138z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},zap:{viewBox:"0 0 24 24",path:"M13 10V3L4 14h7v7l9-11h-7z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},activity:{viewBox:"0 0 24 24",path:"M22 12h-4l-3 9L9 3l-3 9H2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},pulse:{viewBox:"0 0 24 24",path:"M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"trending-up":{viewBox:"0 0 24 24",path:"M23 6l-9.5 9.5-5-5L1 18M17 6h6v6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"trending-down":{viewBox:"0 0 24 24",path:"M23 18l-9.5-9.5-5 5L1 6M17 18h6v-6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},key:{viewBox:"0 0 24 24",path:"M21 2l-2 2m-7.61 7.61a5.5 5.5 0 11-7.778 7.778 5.5 5.5 0 017.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"shield-alert":{viewBox:"0 0 24 24",path:"M12 9v2m0 4h.01M20.618 5.984A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"alert-triangle":{viewBox:"0 0 24 24",path:"M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z M12 9v4 M12 17h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}},bs={"chevron-up":{viewBox:"0 0 24 24",path:"M5 15l7-7 7 7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"chevron-down":{viewBox:"0 0 24 24",path:"M19 9l-7 7-7-7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"chevron-left":{viewBox:"0 0 24 24",path:"M15 19l-7-7 7-7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"chevron-right":{viewBox:"0 0 24 24",path:"M9 5l7 7-7 7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"chevrons-up":{viewBox:"0 0 24 24",path:"M17 11l-5-5-5 5M17 18l-5-5-5 5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"chevrons-down":{viewBox:"0 0 24 24",path:"M7 13l5 5 5-5M7 6l5 5 5-5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"chevrons-left":{viewBox:"0 0 24 24",path:"M11 17l-5-5 5-5M18 17l-5-5 5-5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"chevrons-right":{viewBox:"0 0 24 24",path:"M13 7l5 5-5 5M6 7l5 5-5 5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"external-link":{viewBox:"0 0 24 24",path:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},link:{viewBox:"0 0 24 24",path:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},unlink:{viewBox:"0 0 24 24",path:"M18.84 12.25l1.72-1.71h-.02a5.004 5.004 0 00-.12-7.07 5.006 5.006 0 00-6.95 0l-1.72 1.71M5.17 11.75l-1.71 1.71a5.004 5.004 0 00.12 7.07 5.006 5.006 0 006.95 0l1.71-1.71M8 2v3M2 8h3M16 22v-3M22 16h-3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"corner-up-left":{viewBox:"0 0 24 24",path:"M9 14L4 9l5-5M20 20v-7a4 4 0 00-4-4H4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"corner-up-right":{viewBox:"0 0 24 24",path:"M15 14l5-5-5-5M4 20v-7a4 4 0 014-4h12",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"corner-down-left":{viewBox:"0 0 24 24",path:"M9 10L4 15l5 5M20 4v7a4 4 0 01-4 4H4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"corner-down-right":{viewBox:"0 0 24 24",path:"M15 10l5 5-5 5M4 4v7a4 4 0 004 4h12",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"rotate-cw":{viewBox:"0 0 24 24",path:"M23 4v6h-6M1 20v-6h6M3.51 9a9 9 0 0114.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0020.49 15",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"rotate-ccw":{viewBox:"0 0 24 24",path:"M1 4v6h6M23 20v-6h-6M20.49 9A9 9 0 005.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 013.51 15",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},undo:{viewBox:"0 0 24 24",path:"M3 7v6h6M3 13l4.64-4.36A9 9 0 0121 12",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},redo:{viewBox:"0 0 24 24",path:"M21 7v6h-6M21 13l-4.64-4.36A9 9 0 003 12",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},move:{viewBox:"0 0 24 24",path:"M5 9l-3 3 3 3M9 5l3-3 3 3M15 19l-3 3-3-3M19 9l3 3-3 3M2 12h20M12 2v20",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},expand:{viewBox:"0 0 24 24",path:"M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},shrink:{viewBox:"0 0 24 24",path:"M4 14h6v6M20 10h-6V4M14 10l7-7M3 21l7-7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"log-in":{viewBox:"0 0 24 24",path:"M15 3h4a2 2 0 012 2v14a2 2 0 01-2 2h-4M10 17l5-5-5-5M15 12H3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"log-out":{viewBox:"0 0 24 24",path:"M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4M16 17l5-5-5-5M21 12H9",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"sidebar-left":{viewBox:"0 0 24 24",path:"M4 4h16a2 2 0 012 2v12a2 2 0 01-2 2H4a2 2 0 01-2-2V6a2 2 0 012-2zM9 4v16",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"sidebar-right":{viewBox:"0 0 24 24",path:"M4 4h16a2 2 0 012 2v12a2 2 0 01-2 2H4a2 2 0 01-2-2V6a2 2 0 012-2zM15 4v16",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"panel-left":{viewBox:"0 0 24 24",path:"M3 3h18v18H3V3zM9 3v18",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"panel-right":{viewBox:"0 0 24 24",path:"M3 3h18v18H3V3zM15 3v18",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"panel-top":{viewBox:"0 0 24 24",path:"M3 3h18v18H3V3zM3 9h18",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"panel-bottom":{viewBox:"0 0 24 24",path:"M3 3h18v18H3V3zM3 15h18",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},layers:{viewBox:"0 0 24 24",path:"M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},layout:{viewBox:"0 0 24 24",path:"M4 4h16a2 2 0 012 2v12a2 2 0 01-2 2H4a2 2 0 01-2-2V6a2 2 0 012-2zM2 9h20M9 20V9",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},hash:{viewBox:"0 0 24 24",path:"M4 9h16M4 15h16M10 3L8 21M16 3l-2 18",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"more-horizontal":{viewBox:"0 0 24 24",path:"M12 12h.01M8 12h.01M16 12h.01",stroke:"currentColor",fill:"none",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"},"more-vertical":{viewBox:"0 0 24 24",path:"M12 12h.01M12 8h.01M12 16h.01",stroke:"currentColor",fill:"none",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}},ks={tree:{viewBox:"0 0 24 24",path:"M12 2l2 4h-1l2 4h-1.5l2.5 5h-2l3 6H7l3-6H8l2.5-5H9l2-4h-1l2-4zm-1 19h2v3h-2v-3z",stroke:"currentColor",fill:"none",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"},"star-decoration":{viewBox:"0 0 24 24",path:"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z",stroke:"currentColor",fill:"none",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"},snowflake:{viewBox:"0 0 24 24",paths:["M12 2v20M2 12h20","M4.93 4.93l14.14 14.14M19.07 4.93L4.93 19.07","M12 6l-2 2 2 2 2-2-2-2zM12 14l-2 2 2 2 2-2-2-2z","M6 12l2-2-2-2-2 2 2 2zM14 12l2 2 2-2-2-2-2 2z"],stroke:"currentColor",fill:"none",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"},gift:{viewBox:"0 0 24 24",paths:["M20 12v10H4V12","M22 7H2v5h20V7z","M12 22V7","M12 7H7.5a2.5 2.5 0 0 1 0-5C11 2 12 7 12 7z","M12 7h4.5a2.5 2.5 0 0 0 0-5C13 2 12 7 12 7z"],stroke:"currentColor",fill:"none",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"},"candy-cane":{viewBox:"0 0 24 24",path:"M14.5 3a4.5 4.5 0 0 0-4.5 4.5v13a.5.5 0 0 0 1 0V7.5a3.5 3.5 0 1 1 7 0v1a2.5 2.5 0 0 1-5 0v-.5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},bauble:{viewBox:"0 0 24 24",paths:["M12 22a8 8 0 1 0 0-16 8 8 0 0 0 0 16z","M12 6V3","M9 3h6","M12 6a1 1 0 0 0 1-1V4a1 1 0 0 0-2 0v1a1 1 0 0 0 1 1z"],stroke:"currentColor",fill:"none",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"},bells:{viewBox:"0 0 24 24",paths:["M9 18a5 5 0 0 1-5-5c0-2.76 2.24-5 5-5s5 2.24 5 5a5 5 0 0 1-5 5z","M15 18a5 5 0 0 1-5-5c0-2.76 2.24-5 5-5s5 2.24 5 5a5 5 0 0 1-5 5z","M7 8L5 4M17 8l2-4M9 8V5M15 8V5","M11 5h2"],stroke:"currentColor",fill:"none",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"},holly:{viewBox:"0 0 24 24",paths:["M8 4c-2 2-3 5-1 8 1 2 3 3 5 3s4-1 5-3c2-3 1-6-1-8","M16 4c2 2 3 5 1 8-1 2-3 3-5 3s-4-1-5-3c-2-3-1-6 1-8","M10 17a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3z","M14 17a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3z","M12 19a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3z"],stroke:"currentColor",fill:"none",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"},snowman:{viewBox:"0 0 24 24",paths:["M12 22a5 5 0 1 0 0-10 5 5 0 0 0 0 10z","M12 12a3 3 0 1 0 0-6 3 3 0 0 0 0 6z","M9 9h.01M15 9h.01","M10 10.5s.5 1 2 1 2-1 2-1","M7 2l3 3M17 2l-3 3M12 2v3","M5 15h2M17 15h2"],stroke:"currentColor",fill:"none",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"},reindeer:{viewBox:"0 0 24 24",paths:["M12 22c-3 0-5-2-5-5 0-2 1-4 3-5l2-1 2 1c2 1 3 3 3 5 0 3-2 5-5 5z","M7 12c-2-1-3-3-3-5 0-1 .5-2 1-2s1 .5 1.5 1c.5.5 1 1.5 1.5 2","M17 12c2-1 3-3 3-5 0-1-.5-2-1-2s-1 .5-1.5 1c-.5.5-1 1.5-1.5 2","M4 5l1 2M3 7l2 1M20 5l-1 2M21 7l-2 1","M10 17h.01M14 17h.01","M12 19a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"],stroke:"currentColor",fill:"none",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"},sleigh:{viewBox:"0 0 24 24",paths:["M4 15h14c1 0 2 1 2 2v1H4v-3z","M6 15V8c0-1 1-2 2-2h8c1 0 2 1 2 2v7","M2 20c0-1 2-2 4-2h12c2 0 4 1 4 2","M3 18h1M20 18h1"],stroke:"currentColor",fill:"none",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"},wreath:{viewBox:"0 0 24 24",paths:["M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z","M12 18a6 6 0 1 0 0-12 6 6 0 0 0 0 12z","M12 2v2M12 20v2M2 12h2M20 12h2","M10 3l1 2M13 3l-1 2","M10 3h4"],stroke:"currentColor",fill:"none",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"},"party-popper":{viewBox:"0 0 24 24",paths:["M5.8 11.3 2 22l10.7-3.79","M4 3h.01","M22 8h.01","M15 2h.01","M22 20h.01","M22 2 19.79 7.3 16 8l3.79.79L22 14","M9.6 14.4 14 10","M22 13c-1.93 1.93-5.07 1.93-7 0","M11 8c1.93-1.93 1.93-5.07 0-7","M2 13c1.93 1.93 5.07 1.93 7 0"],stroke:"currentColor",fill:"none",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}},_s={sun:{viewBox:"0 0 24 24",path:"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41M12 6a6 6 0 1 0 0 12 6 6 0 0 0 0-12z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},sunrise:{viewBox:"0 0 24 24",path:"M17 18a5 5 0 1 0-10 0M12 2v7M4.22 10.22l1.42 1.42M1 18h2M21 18h2M18.36 11.64l1.42-1.42M23 22H1M8 6l4-4 4 4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},sunset:{viewBox:"0 0 24 24",path:"M17 18a5 5 0 1 0-10 0M12 9v7M4.22 10.22l1.42 1.42M1 18h2M21 18h2M18.36 11.64l1.42-1.42M23 22H1M16 5l-4 4-4-4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},cloud:{viewBox:"0 0 24 24",path:"M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"cloud-sun":{viewBox:"0 0 24 24",path:"M12 2v2M4.93 4.93l1.41 1.41M2 12h2M19 12a4 4 0 0 0-4-4h-.35A5.5 5.5 0 0 0 4 11a5 5 0 0 0 0 10h11a4 4 0 0 0 4-5v-4z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"cloud-off":{viewBox:"0 0 24 24",path:"M22.61 16.95A5 5 0 0 0 18 10h-1.26a8 8 0 0 0-7.05-6M5 5a8 8 0 0 0 4 15h9a5 5 0 0 0 1.7-.3M1 1l22 22",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},rain:{viewBox:"0 0 24 24",path:"M16 13v8M8 13v8M12 15v8M20 16.58A5 5 0 0 0 18 7h-1.26A8 8 0 1 0 4 15.25",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"cloud-rain":{viewBox:"0 0 24 24",path:"M16 13v8M8 13v8M12 15v8M20 16.58A5 5 0 0 0 18 7h-1.26A8 8 0 1 0 4 15.25",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"cloud-drizzle":{viewBox:"0 0 24 24",path:"M8 19v2M8 13v2M16 19v2M16 13v2M12 21v2M12 15v2M20 16.58A5 5 0 0 0 18 7h-1.26A8 8 0 1 0 4 15.25",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},snow:{viewBox:"0 0 24 24",path:"M20 17.58A5 5 0 0 0 18 8h-1.26A8 8 0 1 0 4 16.25M8 16h.01M8 20h.01M12 18h.01M12 22h.01M16 16h.01M16 20h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},snowflake:{viewBox:"0 0 24 24",path:"M12 2v20M17.66 7l-11.32 10M20.54 12H3.46M17.66 17L6.34 7M12 2l3 3M12 2l-3 3M12 22l3-3M12 22l-3-3M2 12l3 3M2 12l3-3M22 12l-3 3M22 12l-3-3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},wind:{viewBox:"0 0 24 24",path:"M9.59 4.59A2 2 0 1 1 11 8H2m10.59 11.41A2 2 0 1 0 14 16H2m15.73-8.27A2.5 2.5 0 1 1 19.5 12H2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"cloud-lightning":{viewBox:"0 0 24 24",path:"M19 16.9A5 5 0 0 0 18 7h-1.26a8 8 0 1 0-11.62 9M13 11l-4 6h6l-4 6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},lightning:{viewBox:"0 0 24 24",path:"M13 2L3 14h9l-1 8 10-12h-9l1-8z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},fog:{viewBox:"0 0 24 24",path:"M20 15h2M2 15h8M6 19h14M4 11h16M8 7h12",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},haze:{viewBox:"0 0 24 24",path:"M12 3v1M12 20v1M3 12h1M20 12h1M5.6 5.6l.7.7M17.7 17.7l.7.7M5.6 18.4l.7-.7M17.7 6.3l.7-.7M8 12a4 4 0 1 0 8 0 4 4 0 0 0-8 0",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},thermometer:{viewBox:"0 0 24 24",path:"M14 14.76V3.5a2.5 2.5 0 0 0-5 0v11.26a4.5 4.5 0 1 0 5 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"thermometer-sun":{viewBox:"0 0 24 24",path:"M12 9a4 4 0 0 0-2 7.5M12 3v2M5.6 5.6l1.4 1.4M3 12h2M5.6 18.4l1.4-1.4M12 14a2 2 0 1 0 0 4 2 2 0 0 0 0-4zM12 10V3M16 14.76V8a2 2 0 0 0-4 0v6.76",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},moon:{viewBox:"0 0 24 24",path:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"moon-star":{viewBox:"0 0 24 24",path:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9zM19 3v4M17 5h4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},umbrella:{viewBox:"0 0 24 24",path:"M23 12a11.05 11.05 0 0 0-22 0zm-5 7a3 3 0 0 1-6 0v-7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},droplet:{viewBox:"0 0 24 24",path:"M12 2.69l5.66 5.66a8 8 0 1 1-11.31 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},droplets:{viewBox:"0 0 24 24",path:"M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05zM12.56 14.94c1.47 0 2.67-1.25 2.67-2.77 0-.8-.38-1.55-1.14-2.18-.76-.64-1.17-1.32-1.38-2.29-.21.97-.62 1.65-1.38 2.29-.76.63-1.14 1.38-1.14 2.18 0 1.52 1.19 2.77 2.67 2.77zM19.5 17.35c1.1 0 2-.93 2-2.08 0-.6-.29-1.17-.86-1.64-.57-.48-.88-1-.57-1.73-.31.73-.62 1.25-1.19 1.73-.57.47-.86 1.04-.86 1.64 0 1.15.9 2.08 2 2.08z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},rainbow:{viewBox:"0 0 24 24",path:"M22 17a10 10 0 0 0-20 0M18 17a6 6 0 0 0-12 0M14 17a2 2 0 0 0-4 0",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}},ws={smartphone:{viewBox:"0 0 24 24",path:"M17 2H7a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2zM12 18h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"phone-call":{viewBox:"0 0 24 24",path:"M15.05 5A5 5 0 0 1 19 8.95M15.05 1A9 9 0 0 1 23 8.94m-1 7.98v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"phone-off":{viewBox:"0 0 24 24",path:"M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91M23 1L1 23",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},tablet:{viewBox:"0 0 24 24",path:"M18 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2zM12 18h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"tablet-smartphone":{viewBox:"0 0 24 24",path:"M18 2H10a2 2 0 0 0-2 2v4M14 22h4a2 2 0 0 0 2-2V8M8 14H6a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2zM7 18h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},laptop:{viewBox:"0 0 24 24",path:"M20 16V7a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v9m16 0H4m16 0l1.28 2.55a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45L4 16",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},monitor:{viewBox:"0 0 24 24",path:"M20 3H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zM8 21h8M12 17v4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},desktop:{viewBox:"0 0 24 24",path:"M20 3H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zM8 21h8M12 17v4M2 12h20",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},tv:{viewBox:"0 0 24 24",path:"M20 7H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2zM17 2l-5 5-5-5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"tv-minimal":{viewBox:"0 0 24 24",path:"M20 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},watch:{viewBox:"0 0 24 24",path:"M12 19a7 7 0 1 0 0-14 7 7 0 0 0 0 14zM12 9v3l1.5 1.5M16.51 17.35l-.35 3.83a2 2 0 0 1-2 1.82H9.83a2 2 0 0 1-2-1.82l-.35-3.83m.01-10.7l.35-3.83A2 2 0 0 1 9.83 1h4.35a2 2 0 0 1 2 1.82l.35 3.83",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},smartwatch:{viewBox:"0 0 24 24",path:"M18 8a6 6 0 0 0-12 0v8a6 6 0 0 0 12 0V8zM12 11v3M18 6l1-3H5l1 3M18 18l1 3H5l1-3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},speaker:{viewBox:"0 0 24 24",path:"M18 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2zM12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4zM12 6h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},headphones:{viewBox:"0 0 24 24",path:"M3 18v-6a9 9 0 0 1 18 0v6M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3zM3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},airpods:{viewBox:"0 0 24 24",path:"M5.5 4a2.5 2.5 0 0 0-2.5 2.5v5a2.5 2.5 0 0 0 5 0v-5A2.5 2.5 0 0 0 5.5 4zM18.5 4a2.5 2.5 0 0 0-2.5 2.5v5a2.5 2.5 0 0 0 5 0v-5A2.5 2.5 0 0 0 18.5 4zM5.5 14v6M18.5 14v6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},camera:{viewBox:"0 0 24 24",path:"M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2zM12 17a4 4 0 1 0 0-8 4 4 0 0 0 0 8z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},webcam:{viewBox:"0 0 24 24",path:"M12 14a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM12 14v8M8 22h8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},keyboard:{viewBox:"0 0 24 24",path:"M20 5H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2zM6 9h.01M10 9h.01M14 9h.01M18 9h.01M6 13h.01M18 13h.01M8 17h8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},mouse:{viewBox:"0 0 24 24",path:"M6 3h12a3 3 0 0 1 3 3v12a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3zM12 3v6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},gamepad:{viewBox:"0 0 24 24",path:"M6 12h4M8 10v4M15 13h.01M18 11h.01M17.32 5H6.68a4 4 0 0 0-3.978 3.59l-.891 9a4 4 0 0 0 6.9 3.31l1.29-1.29 1.29 1.29a4 4 0 0 0 6.9-3.31l-.891-9A4 4 0 0 0 17.32 5z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},joystick:{viewBox:"0 0 24 24",path:"M21 17a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-2zM6 15v-2M12 15V5m0 0l4 4m-4-4L8 9",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},database:{viewBox:"0 0 24 24",path:"M12 2C6.477 2 2 3.582 2 5.5v3C2 10.418 6.477 12 12 12s10-1.582 10-3.5v-3C22 3.582 17.523 2 12 2zM2 8.5v4C2 14.418 6.477 16 12 16s10-1.582 10-3.5v-4M2 12.5v4C2 18.418 6.477 20 12 20s10-1.582 10-3.5v-4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"hard-drive":{viewBox:"0 0 24 24",path:"M22 12H2M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11zM6 16h.01M10 16h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},usb:{viewBox:"0 0 24 24",path:"M16 4h2a2 2 0 0 1 2 2v1M6 4h2a2 2 0 0 1 2 2v1M10 16v-5a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v5a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2zM20 16v-5a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v5a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2zM12 12v8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},router:{viewBox:"0 0 24 24",path:"M20 14H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2zM6 18h.01M12 7a5 5 0 0 0-5 5M19 7a5 5 0 0 0-5-5M12 7V2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},printer:{viewBox:"0 0 24 24",path:"M6 9V2h12v7M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2M6 14h12v8H6z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},cpu:{viewBox:"0 0 24 24",path:"M18 4H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zM9 9h6v6H9zM9 1v3M15 1v3M9 20v3M15 20v3M20 9h3M20 14h3M1 9h3M1 14h3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},battery:{viewBox:"0 0 24 24",path:"M17 6H5a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2zM23 13v-2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"battery-charging":{viewBox:"0 0 24 24",path:"M5 18H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h3.19M15 6h2a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-3.19M23 13v-2M11 6l-4 6h6l-4 6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},plug:{viewBox:"0 0 24 24",path:"M12 22v-5M9 8V2M15 8V2M18 8H6a2 2 0 0 0-2 2v1a8 8 0 0 0 16 0v-1a2 2 0 0 0-2-2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}},Ms={"chart-line":{viewBox:"0 0 24 24",path:"M3 3v18h18M18 9l-5 5-4-4-3 3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"chart-bar":{viewBox:"0 0 24 24",path:"M12 20V10M6 20v-4M18 20V4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"bar-chart":{viewBox:"0 0 24 24",path:"M12 20V10M6 20v-4M18 20V4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"chart-bar-horizontal":{viewBox:"0 0 24 24",path:"M4 12h10M4 6h4M4 18h14",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"chart-pie":{viewBox:"0 0 24 24",path:"M21.21 15.89A10 10 0 1 1 8 2.83M22 12A10 10 0 0 0 12 2v10z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"chart-area":{viewBox:"0 0 24 24",path:"M3 3v18h18M7 12l5-5 4 4 5-5v12H7z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"chart-candlestick":{viewBox:"0 0 24 24",path:"M9 5v4M9 11v8M15 5v8M15 17v2M7 9h4v2H7zM13 13h4v4h-4z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"trending-up":{viewBox:"0 0 24 24",path:"M23 6l-9.5 9.5-5-5L1 18",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"trending-down":{viewBox:"0 0 24 24",path:"M23 18l-9.5-9.5-5 5L1 6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"trending-neutral":{viewBox:"0 0 24 24",path:"M22 12H2M18 8l4 4-4 4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},wallet:{viewBox:"0 0 24 24",path:"M21 12V7a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-1M21 12H17a2 2 0 0 1 0-4h4M17 12h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"credit-card":{viewBox:"0 0 24 24",path:"M21 4H3a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zM1 10h22",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},banknote:{viewBox:"0 0 24 24",path:"M2 8a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8zM12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4zM6 10h.01M18 14h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},coins:{viewBox:"0 0 24 24",path:"M8 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM8 12c2.2 0 4 1.8 4 4s-1.8 4-4 4-4-1.8-4-4 1.8-4 4-4zM16 8a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM16 8c2.2 0 4 1.8 4 4s-1.8 4-4 4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"dollar-sign":{viewBox:"0 0 24 24",path:"M12 1v22M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"pound-sign":{viewBox:"0 0 24 24",path:"M18 5H9a4 4 0 0 0-4 4v3a4 4 0 0 0 4 4h3M5 12h10M18 19H7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"euro-sign":{viewBox:"0 0 24 24",path:"M4 10h12M4 14h12M17 5a8 8 0 0 0-14 5.5 8 8 0 0 0 14 5.5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},bitcoin:{viewBox:"0 0 24 24",path:"M11.767 19.089c4.924.868 6.14-6.025 1.216-6.894m-1.216 6.894L5.86 18.047m5.908 1.042-.347 1.97m1.563-8.864c4.924.869 6.14-6.025 1.215-6.893m-1.215 6.893-3.94-.694m5.155-6.2L8.29 4.26m5.908 1.042.348-1.97M7.48 20.364l3.126-17.727",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},bank:{viewBox:"0 0 24 24",path:"M3 21h18M4 21V10M8 21V10M12 21V10M16 21V10M20 21V10M12 3L2 8h20z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},vault:{viewBox:"0 0 24 24",path:"M3 5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5zM12 12m-3 0a3 3 0 1 0 6 0 3 3 0 1 0-6 0M7 12h2M15 12h2M12 9V7M12 17v-2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"piggy-bank":{viewBox:"0 0 24 24",path:"M19 5c-1.5 0-2.8 1.4-3 2-3.5-1.5-11-.3-11 5 0 1.8 0 3 2 4.5V20h4v-2h3v2h4v-4c1-.5 1.7-1 2-2h2v-4h-2c0-1-.5-1.5-1-2zM2 9v1c0 1.1.9 2 2 2h1",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},safe:{viewBox:"0 0 24 24",path:"M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2zM12 12m-2 0a2 2 0 1 0 4 0 2 2 0 1 0-4 0M16 8h.01M16 16h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},receipt:{viewBox:"0 0 24 24",path:"M4 2v20l3-2 3 2 3-2 3 2 3-2 3 2V2l-3 2-3-2-3 2-3-2-3 2-3-2zM8 10h8M8 14h4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},invoice:{viewBox:"0 0 24 24",path:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8zM14 2v6h6M8 13h8M8 17h8M8 9h2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},briefcase:{viewBox:"0 0 24 24",path:"M20 7H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2zM16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},percent:{viewBox:"0 0 24 24",path:"M19 5L5 19M6.5 9a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5zM17.5 20a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},calculator:{viewBox:"0 0 24 24",path:"M18 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2zM8 6h8M8 10h.01M12 10h.01M16 10h.01M8 14h.01M12 14h.01M16 14h.01M8 18h.01M12 18h.01M16 18h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},growth:{viewBox:"0 0 24 24",path:"M12 20V12M12 12l-4 4M12 12l4 4M8 20h8M3 8l4-4 4 4 5-5 5 5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},investment:{viewBox:"0 0 24 24",path:"M12 2v20M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6M2 12h4M18 12h4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},scale:{viewBox:"0 0 24 24",path:"M12 3v18M3 6l3 10a6 6 0 0 0 6 0L15 6M9 6l6 0M21 6l-3 10a6 6 0 0 1-6 0",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}},xs={"heart-pulse":{viewBox:"0 0 24 24",path:"M19.5 12.572l-7.5 7.428-7.5-7.428A5 5 0 1 1 12 5.006a5 5 0 1 1 7.5 7.566zM3 12h4l2-4 4 8 2-4h6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},activity:{viewBox:"0 0 24 24",path:"M22 12h-4l-3 9L9 3l-3 9H2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},pulse:{viewBox:"0 0 24 24",path:"M3 12h4l2-7 4 14 2-7h6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},pill:{viewBox:"0 0 24 24",path:"M10.5 20.5l9-9a4.95 4.95 0 0 0-7-7l-9 9a4.95 4.95 0 0 0 7 7zM8.5 8.5l7 7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"pill-bottle":{viewBox:"0 0 24 24",path:"M6 3h12v5H6zM5 8h14a1 1 0 0 1 1 1v11a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V9a1 1 0 0 1 1-1zM10 14h4M12 12v4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},capsule:{viewBox:"0 0 24 24",path:"M8 8a4 4 0 0 1 8 0v8a4 4 0 0 1-8 0V8zM8 12h8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},syringe:{viewBox:"0 0 24 24",path:"M18 2l4 4M15 5l6 6M8 6l10 10-4 4L4 10zM2 22l6-6M7 11l2 2M11 7l2 2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},vaccine:{viewBox:"0 0 24 24",path:"M14 2l4 4M8 8l8 8M3 17l4 4M6.5 6.5L20 20M12 12l2.5-2.5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},stethoscope:{viewBox:"0 0 24 24",path:"M4.8 2.3A.3.3 0 1 0 5 2H4a2 2 0 0 0-2 2v5a6 6 0 0 0 6 6v0a6 6 0 0 0 6-6V4a2 2 0 0 0-2-2h-1a.2.2 0 1 0 .3.3M8 15v1a6 6 0 0 0 6 6v0a6 6 0 0 0 6-6v-4M22 10a2 2 0 1 0-4 0 2 2 0 0 0 4 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"thermometer-medical":{viewBox:"0 0 24 24",path:"M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0zM12 14v2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},bandage:{viewBox:"0 0 24 24",path:"M18 2l4 4-14 14-4-4zM10.5 7.5l6 6M8.5 9.5l1 1M14.5 15.5l1 1M12.5 11.5l1 1",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},hospital:{viewBox:"0 0 24 24",path:"M3 21h18M5 21V7l7-4 7 4v14M9 21v-6h6v6M10 9h4M12 7v4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},ambulance:{viewBox:"0 0 24 24",path:"M10 10H6M8 8v4M15 21a2 2 0 1 0 0-4 2 2 0 0 0 0 4zM7 21a2 2 0 1 0 0-4 2 2 0 0 0 0 4zM21 15V8a2 2 0 0 0-2-2h-3l-2-3H6a2 2 0 0 0-2 2v10M21 9h-4a2 2 0 0 0-2 2v4h6z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"first-aid":{viewBox:"0 0 24 24",path:"M20 6H4a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2zM9 12h6M12 9v6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"medical-cross":{viewBox:"0 0 24 24",path:"M8 3h8v6h5v6h-5v6H8v-6H3V9h5z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},dna:{viewBox:"0 0 24 24",path:"M2 15c6.667-6 13.333 0 20-6M9 22c1.798-1.998 2.518-3.995 2.807-5.993M15 2c-1.798 1.998-2.518 3.995-2.807 5.993M2 9c6.667 6 13.333 0 20 6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},microscope:{viewBox:"0 0 24 24",path:"M6 18h8M3 22h18M14 22a7 7 0 1 0 0-14M9 14h.01M9 6v8M6 6h6l-3-4z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"test-tube":{viewBox:"0 0 24 24",path:"M14.5 2v17.5c0 1.4-1.1 2.5-2.5 2.5s-2.5-1.1-2.5-2.5V2M7 2h10M8.5 14h7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},brain:{viewBox:"0 0 24 24",path:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18ZM12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18ZM12 5v13",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},lungs:{viewBox:"0 0 24 24",path:"M6.081 20C2.477 20 2 15.5 2 12.5S4 6 4 6s2-1 2-3M17.92 20c3.603 0 4.08-4.5 4.08-7.5S20 6 20 6s-2-1-2-3M12 3v17M12 12c-4 0-7-2-7-2M12 12c4 0 7-2 7-2M12 16c-4 0-7-2-7-2M12 16c4 0 7-2 7-2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},bone:{viewBox:"0 0 24 24",path:"M17 10c.7-.7 1.69 0 2.5 0a2.5 2.5 0 1 0 0-5 .5.5 0 0 1-.5-.5 2.5 2.5 0 1 0-5 0c0 .81.7 1.8 0 2.5l-7 7c-.7.7-1.69 0-2.5 0a2.5 2.5 0 0 0 0 5c.28 0 .5.22.5.5a2.5 2.5 0 1 0 5 0c0-.81-.7-1.8 0-2.5Z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},tooth:{viewBox:"0 0 24 24",path:"M12 2C7 2 4 5 4 8c0 5 1 8 2 10 .5 1 1 4 2.5 4s1.5-2 3.5-2 2 2 3.5 2 2-3 2.5-4c1-2 2-5 2-10 0-3-3-6-8-6z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"eye-medical":{viewBox:"0 0 24 24",path:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8zM12 9v6M9 12h6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},wheelchair:{viewBox:"0 0 24 24",path:"M12 10a2 2 0 1 0 0-4 2 2 0 0 0 0 4zM15 21a4 4 0 1 0-5-6M12 10v4h4l2 5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},crutch:{viewBox:"0 0 24 24",path:"M5 5l7 7M7 3l7 7M19 19l-7-7M21 17l-7-7M11 11l-6 6M13 13l-6 6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"scale-weight":{viewBox:"0 0 24 24",path:"M12 3a9 9 0 0 0-9 9 9 9 0 0 0 9 9 9 9 0 0 0 9-9 9 9 0 0 0-9-9zM12 7v5l3 3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"blood-drop":{viewBox:"0 0 24 24",path:"M12 2c-4 4-7 7-7 11a7 7 0 0 0 14 0c0-4-3-7-7-11z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},heartbeat:{viewBox:"0 0 24 24",path:"M3 12h4l3-9 4 18 3-9h4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}},Ls={football:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM12 6l4 4-4 4-4-4zM6 12l4-4v8zM18 12l-4 4V8z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},soccer:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM12 8l2.5 2-1 3h-3l-1-3zM12 2v3M22 12h-3M12 22v-3M2 12h3M4.93 4.93l2.12 2.12M19.07 4.93l-2.12 2.12M4.93 19.07l2.12-2.12M19.07 19.07l-2.12-2.12",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},basketball:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM2.05 11h19.9M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},tennis:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM3.5 8.5c4-1 8 0 12 4M3.5 15.5c4 1 8 0 12-4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},baseball:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM5 5c1.5 2 2.5 4 2.5 7s-1 5-2.5 7M19 5c-1.5 2-2.5 4-2.5 7s1 5 2.5 7",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},volleyball:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM12 2v10M12 12l8.66 5M12 12l-8.66 5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},golf:{viewBox:"0 0 24 24",path:"M12 18v4M8 22h8M12 2v16M12 6l6-2-6 8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},bowling:{viewBox:"0 0 24 24",path:"M12 22a8 8 0 1 0 0-16 8 8 0 0 0 0 16zM12 6V2M10 9h.01M14 9h.01M12 12h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},rugby:{viewBox:"0 0 24 24",path:"M5 5c8-2 16 6 14 14C11 21 3 13 5 5zM9 9l6 6M11 9l-1 1M13 11l-1 1M15 13l-1 1",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},cricket:{viewBox:"0 0 24 24",path:"M14 2l8 8-9 9-3-3 9-9M13 3l-9 9M7 17a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},hockey:{viewBox:"0 0 24 24",path:"M7 2v11c0 3 2 5 5 5h3a3 3 0 0 0 0-6M19 18.5a2 2 0 1 0 0 4 2 2 0 0 0 0-4z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"table-tennis":{viewBox:"0 0 24 24",path:"M14.5 3.5a7 7 0 0 0-9.9 9.9l-2.3 4.3a1 1 0 0 0 1.3 1.3l4.3-2.3a7 7 0 0 0 6.6-13.2zM17 15.5a3 3 0 1 0 0 6 3 3 0 0 0 0-6z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"world-cup":{viewBox:"0 0 24 24",path:"M12 2a5 5 0 1 0 0 10 5 5 0 0 0 0-10zM7 7h10M12 2v10M9 3.2c-1.4 2-1.4 5.6 0 7.6M15 3.2c1.4 2 1.4 5.6 0 7.6M10 12l-1 4h6l-1-4M8 16h8M11 16v4M13 16v4M8 20h8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},jersey:{viewBox:"0 0 24 24",path:"M9 3L4 6l2.5 3.5L9 8M15 3l5 3-2.5 3.5L15 8M9 3a3 3 0 0 0 6 0M9 8v13h6V8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"football-boot":{viewBox:"0 0 24 24",path:"M3 7v5a3 3 0 0 0 3 3h11a4 4 0 0 0 1-7.9L9 7c-1-1-2.2-2-4-2H3zM5 18h2M9 18h2M13 18h2M17 18h2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},goal:{viewBox:"0 0 24 24",path:"M2 5h20v11H2zM2 5l3 3v8M22 5l-3 3v8M5 8h14v8M2 11h20M9 8v8M15 8v8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"corner-flag":{viewBox:"0 0 24 24",path:"M6 2v20M6 3h12l-3.5 4L18 11H6M3 22h6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"referee-card":{viewBox:"0 0 24 24",path:"M8.5 2.5l9 3a2 2 0 0 1 1.3 2.5l-4.6 13a2 2 0 0 1-2.5 1.3l-9-3a2 2 0 0 1-1.3-2.5l4.6-13a2 2 0 0 1 2.5-1.3z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},stadium:{viewBox:"0 0 24 24",path:"M2 8c0-2.2 4.5-4 10-4s10 1.8 10 4-4.5 4-10 4-10-1.8-10-4zM2 8v6c0 2.2 4.5 4 10 4s10-1.8 10-4V8M8 12.5V18M16 12.5V18",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},scoreboard:{viewBox:"0 0 24 24",path:"M3 4h18v12H3zM3 16l3 4M21 16l-3 4M12 6v8M6 8h3v6H6zM15 8h3v6h-3z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},dumbbell:{viewBox:"0 0 24 24",path:"M6.5 6.5h11M17.5 4v5M6.5 4v5M17.5 15v5M6.5 15v5M4 6v3a1 1 0 0 0 1 1h1.5M4 18v-3a1 1 0 0 1 1-1h1.5M20 6v3a1 1 0 0 1-1 1h-1.5M20 18v-3a1 1 0 0 0-1-1h-1.5M6.5 17.5h11",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},barbell:{viewBox:"0 0 24 24",path:"M4 12h16M6 8v8M10 6v12M14 6v12M18 8v8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},kettlebell:{viewBox:"0 0 24 24",path:"M12 6a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM17 22H7a5 5 0 0 1-1-9.9V10a6 6 0 0 1 12 0v2.1a5 5 0 0 1-1 9.9z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},running:{viewBox:"0 0 24 24",path:"M13 4a2 2 0 1 0 0-4 2 2 0 0 0 0 4zM5 22l3-9 3 3v6M10 6l5 3 4-1M4 13l5 3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},swimming:{viewBox:"0 0 24 24",path:"M2 20c.9 0 1.6-.4 2.2-.9.8-.7 1.9-.7 2.7 0 1.1 1 2.8 1 3.9 0 .8-.7 1.9-.7 2.7 0 1.1 1 2.8 1 3.9 0 .8-.7 1.9-.7 2.7 0 .6.5 1.3.9 2.2.9M8 16l-2-4 4-2 6 4 4-3M15 4a2 2 0 1 0 0-4 2 2 0 0 0 0 4z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},cycling:{viewBox:"0 0 24 24",path:"M5 18a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM19 18a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM5 14l4-4 3 3 4-4M12 6a2 2 0 1 0 0-4 2 2 0 0 0 0 4z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},yoga:{viewBox:"0 0 24 24",path:"M12 4a2 2 0 1 0 0-4 2 2 0 0 0 0 4zM4 17l4-4-2-4 6-3 6 3-2 4 4 4M8 22l4-5 4 5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},trophy:{viewBox:"0 0 24 24",path:"M6 9H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h2M18 9h2a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2h-2M6 3v6a6 6 0 0 0 12 0V3M12 15v4M8 22h8M8 19h8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},medal:{viewBox:"0 0 24 24",path:"M12 15a6 6 0 1 0 0 12 6 6 0 0 0 0-12zM8 3l4 6 4-6M8 3h8M12 9v6M9 19.5l3 1.5 3-1.5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},award:{viewBox:"0 0 24 24",path:"M12 15a7 7 0 1 0 0-14 7 7 0 0 0 0 14zM8.21 13.89L7 23l5-3 5 3-1.21-9.12",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},crown:{viewBox:"0 0 24 24",path:"M2 17l3-10 5 6 2-8 2 8 5-6 3 10H2zM4 21h16",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},podium:{viewBox:"0 0 24 24",path:"M5 10h4v12H5zM10 6h4v16h-4zM15 14h4v8h-4zM12 2v4M10 4h4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},stopwatch:{viewBox:"0 0 24 24",path:"M12 5a9 9 0 1 0 0 18 9 9 0 0 0 0-18zM12 9v5l3 3M10 2h4M21 6l-2-2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},whistle:{viewBox:"0 0 24 24",path:"M5 16a4 4 0 1 0 8 0 4 4 0 0 0-8 0zM2 12l7-4h8l3 4-3 4M18 8l4-4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},target:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM12 6a6 6 0 1 0 0 12 6 6 0 0 0 0-12zM12 10a2 2 0 1 0 0 4 2 2 0 0 0 0-4z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"boxing-glove":{viewBox:"0 0 24 24",path:"M5 8c0-3 2-5 5-5h4c3 0 5 2 5 5v5c0 4-3 7-7 7s-7-3-7-7V8zM9 5v4M12 20v2M9 12h6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},racket:{viewBox:"0 0 24 24",path:"M12 2a6 6 0 0 0-6 6v4a6 6 0 0 0 12 0V8a6 6 0 0 0-6-6zM12 18v4M8 8h8M8 12h8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},skate:{viewBox:"0 0 24 24",path:"M4 16V6a2 2 0 0 1 2-2h8l4 4v8M2 16h18v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-2zM6 20v2M16 20v2M10 10h4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},ski:{viewBox:"0 0 24 24",path:"M5 16l14-6M3 21l18-8M12 2a2 2 0 1 0 0 4 2 2 0 0 0 0-4zM12 8l-4 8M14 10l2 4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},surfboard:{viewBox:"0 0 24 24",path:"M21 3L3 21M17 3c3 3 4 8 1 15L3 21c7-3 12-2 15 1M12 12l-4 4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},mountain:{viewBox:"0 0 24 24",path:"M8 21l4-10 3 6 2-4 4 8H3l5-10 4 10z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},tent:{viewBox:"0 0 24 24",path:"M12 2L2 20h20L12 2zM12 2v18M7 14l5-6 5 6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},compass:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM16.24 7.76l-2.12 6.36-6.36 2.12 2.12-6.36z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},fishing:{viewBox:"0 0 24 24",path:"M18 2l-3 3v3l-4 4-5-2-4 4v5h5l4-4-2-5 4-4h3l3-3M12 22c-2 0-3-1-3-3M9 19c-2 0-3-1-3-3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}},Cs={building:{viewBox:"0 0 24 24",path:"M3 21h18M5 21V7l7-4 7 4v14M9 21v-4h6v4M9 9h.01M15 9h.01M9 13h.01M15 13h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},house:{viewBox:"0 0 24 24",path:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9zM9 22V12h6v10",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},home:{viewBox:"0 0 24 24",path:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},cabin:{viewBox:"0 0 24 24",path:"M2 20h20M4 20V10l8-8 8 8v10M10 20v-6h4v6M12 2v2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},apartment:{viewBox:"0 0 24 24",path:"M4 21V4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v17M8 6h2M14 6h2M8 10h2M14 10h2M8 14h2M14 14h2M10 21v-4h4v4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},office:{viewBox:"0 0 24 24",path:"M3 21h18M5 21V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16M9 21v-4h6v4M9 7h.01M15 7h.01M9 11h.01M15 11h.01M9 15h.01M15 15h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},store:{viewBox:"0 0 24 24",path:"M4 3h16l1 6H3l1-6zM3 9v10a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V9M10 21v-6h4v6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},warehouse:{viewBox:"0 0 24 24",path:"M3 21h18M4 21V8l8-5 8 5v13M9 17h6v4H9zM9 12h6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},factory:{viewBox:"0 0 24 24",path:"M2 21h20M5 21V11l6 4V9l6 4V5a2 2 0 0 1 2-2h0a2 2 0 0 1 2 2v16M8 21v-3M12 21v-3M16 21v-3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},hotel:{viewBox:"0 0 24 24",path:"M4 21V3a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v18M8 5h2M14 5h2M8 9h2M14 9h2M8 13h2M14 13h2M10 21v-4h4v4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},school:{viewBox:"0 0 24 24",path:"M2 22h20M12 2l10 6v14M2 8l10-6M12 8v14M4 10v12M20 10v12M8 14h.01M16 14h.01M10 22v-4h4v4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},university:{viewBox:"0 0 24 24",path:"M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},library:{viewBox:"0 0 24 24",path:"M4 21h16M5 21V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16M9 7h6M9 11h6M9 15h4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},museum:{viewBox:"0 0 24 24",path:"M2 20h20M4 20V10M20 20V10M12 2L2 8h20L12 2zM8 20v-6h3v6M13 20v-6h3v6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},court:{viewBox:"0 0 24 24",path:"M2 20h20M4 20V8l8-6 8 6v12M10 20v-6h4v6M6 10h12M12 4v6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},church:{viewBox:"0 0 24 24",path:"M18 22H6a2 2 0 0 1-2-2V9l8-7 8 7v11a2 2 0 0 1-2 2zM12 2v4M10 4h4M10 22v-5a2 2 0 0 1 4 0v5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},mosque:{viewBox:"0 0 24 24",path:"M3 21h18M5 21v-8c0-2 .5-4 2-6 1.5 2 2 4 2 6v8M15 21v-8c0-2 .5-4 2-6 1.5 2 2 4 2 6v8M12 3a4 4 0 0 1 4 4v14M12 3a4 4 0 0 0-4 4v14M12 1v2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},temple:{viewBox:"0 0 24 24",path:"M2 22h20M4 22V12h4v10M16 22V12h4v10M8 22V8h8v14M12 2l6 6H6l6-6M10 14h4M10 18h4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},castle:{viewBox:"0 0 24 24",path:"M2 22h20M4 22V10h4V6H6V2h3v2h2V2h2v2h2V2h3v4h-2v4h4v12M10 22v-5h4v5M4 6h4M16 6h4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},fortress:{viewBox:"0 0 24 24",path:"M2 20h20M4 20V8h16v12M8 8V4h2v4M14 8V4h2v4M4 4h4M16 4h4M8 20v-4h3v4M13 20v-4h3v4M7 12h2M15 12h2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},tower:{viewBox:"0 0 24 24",path:"M8 22V4a4 4 0 0 1 8 0v18M8 8h8M8 14h8M10 22v-4h4v4M12 1v1",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},lighthouse:{viewBox:"0 0 24 24",path:"M7 22l2-16h6l2 16M9 6V3a3 3 0 0 1 6 0v3M2 11h5M17 11h5M9 12h6M10 18h4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},bridge:{viewBox:"0 0 24 24",path:"M2 18h20M4 14c0-2 2-4 4-4s4 2 4 4c0-2 2-4 4-4s4 2 4 4M4 18v-4M20 18v-4M12 18v-4M8 10V6M16 10V6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},stadium:{viewBox:"0 0 24 24",path:"M2 16c0-3 4.5-5 10-5s10 2 10 5v2c0 3-4.5 5-10 5s-10-2-10-5v-2zM2 12c0-3 4.5-5 10-5s10 2 10 5M12 3v4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},airport:{viewBox:"0 0 24 24",path:"M21 16v-2l-8-5V3.5a1.5 1.5 0 0 0-3 0V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"train-station":{viewBox:"0 0 24 24",path:"M4 21h16M6 17V7a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v10M8 21v-4h3v4M13 21v-4h3v4M12 2v3M9 9h6M9 13h6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},monument:{viewBox:"0 0 24 24",path:"M8 22h8M10 22V10L12 2l2 8v12M6 18h12M8 14h8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},obelisk:{viewBox:"0 0 24 24",path:"M7 22l2-18h6l2 18M12 2l-1 2h2l-1-2M9 8h6M9 14h6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},arch:{viewBox:"0 0 24 24",path:"M4 22V10a8 8 0 0 1 16 0v12M4 8h16M4 14h16M8 22v-8M16 22v-8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},windmill:{viewBox:"0 0 24 24",path:"M7 22l3-10h4l3 10M12 12V3M12 6l6-3M12 6L6 3M12 6l6 3M12 6L6 9M10 16h4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},skyscraper:{viewBox:"0 0 24 24",path:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18M2 22h20M10 6h4M10 10h4M10 14h4M10 18h4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},pyramid:{viewBox:"0 0 24 24",path:"M12 2L2 22h20L12 2zM12 2v20M7 12h10",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},dome:{viewBox:"0 0 24 24",path:"M2 22h20M4 22v-6a8 8 0 0 1 16 0v6M12 2v6M12 2a3 3 0 0 1 0 6M10 14h4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},barn:{viewBox:"0 0 24 24",path:"M3 21h18M5 21V11l7-8 7 8v10M10 21v-5h4v5M9 11h6M12 3v2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}},Es={smile:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM8 9h.01M16 9h.01M8 14s1.5 2 4 2 4-2 4-2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},grin:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM8 9h.01M16 9h.01M6 13a6 6 0 0 0 12 0H6z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},laugh:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM7 9c0-.6.4-1 1-1s1 .4 1 1M15 9c0-.6.4-1 1-1s1 .4 1 1M7 13h10a5 5 0 0 1-10 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},joy:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM7 9l2 1M15 9l2 1M6 13h12a6 6 0 0 1-12 0z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},wink:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM8 9h.01M14 9h4M8 14s1.5 2 4 2 4-2 4-2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},blush:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM8 9h.01M16 9h.01M8 14s1.5 2 4 2 4-2 4-2M5 13h2M17 13h2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"heart-eyes":{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM8 14s1.5 2 4 2 4-2 4-2M6.5 10c.5-1 1.5-2 2.5-1s-1 2.5-2.5 1zM15 10c.5-1 1.5-2 2.5-1s-1 2.5-2.5 1z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"star-eyes":{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM8 14s1.5 2 4 2 4-2 4-2M8 9l.5-1 .5 1 1-.5-.5 1 .5 1-1-.5-.5 1-.5-1-1 .5.5-1-.5-1zM16 9l.5-1 .5 1 1-.5-.5 1 .5 1-1-.5-.5 1-.5-1-1 .5.5-1-.5-1z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},sad:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM8 9h.01M16 9h.01M16 16s-1.5-2-4-2-4 2-4 2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},cry:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM8 9h.01M16 9h.01M16 16s-1.5-2-4-2-4 2-4 2M8 11v2M16 11v2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},sob:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM6 9l3 1M18 9l-3 1M16 17s-1.5-2-4-2-4 2-4 2M7 12l1 6M17 12l-1 6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},disappointed:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM6 8l4 2M18 8l-4 2M16 16s-1.5-2-4-2-4 2-4 2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},angry:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM6 8l4 2M18 8l-4 2M9 15h6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},rage:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM5 7l5 3M19 7l-5 3M9 16h6M9 16l1-2M15 16l-1-2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},annoyed:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM6 8l4 1M18 8l-4 1M8 9h.01M16 9h.01M9 15h6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},surprised:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM8 8v1M16 8v1M12 13a2 2 0 1 0 0 4 2 2 0 0 0 0-4z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},shocked:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM7 8l2 1M17 8l-2 1M12 13v5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},astonished:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM6 8l4 1M18 8l-4 1M12 12a3 3 0 1 0 0 6 3 3 0 0 0 0-6z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},thinking:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM8 9h.01M16 9h.01M10 15h4c0 1-1 2-2 2s-2-1-2-2zM19 9c1 0 2-1 2-2s-1-2-2-2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},confused:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM8 9h.01M16 9h.01M9 15c2-2 4 0 6-2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},neutral:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM8 9h.01M16 9h.01M8 15h8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},expressionless:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM7 9h3M14 9h3M8 15h8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},cool:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM5 10h5l1-2h2l1 2h5M5 10c0 1 1 2 2.5 2s2.5-1 2.5-2M14 10c0 1 1 2 2.5 2s2.5-1 2.5-2M8 16s1.5 2 4 2 4-2 4-2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},nerd:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM6 9a2 2 0 1 0 4 0 2 2 0 0 0-4 0zM14 9a2 2 0 1 0 4 0 2 2 0 0 0-4 0zM10 9h4M8 15s1.5 1 4 1 4-1 4-1",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},tongue:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM8 9h.01M16 9h.01M8 13h8M10 13v3c0 1 1 2 2 2s2-1 2-2v-3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},silly:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM7 9h2M17 9l-2-1M7 13c2 0 3 3 5 3s3-3 5-3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},zany:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM8 8v2M15 8l2 2M8 14h8c0 2-2 4-4 4s-4-2-4-4z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},sick:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM8 9h.01M16 9h.01M8 15c2 1 6-1 8 0M18 5c1.5 1.5 1.5 3.5 0 5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},sleepy:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM7 10c.5-.5 1.5-.5 2 0M15 10c.5-.5 1.5-.5 2 0M12 14a2 2 0 1 0 0 4 2 2 0 0 0 0-4zM18 4l2 2M20 4h-2v2",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},dead:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM6 8l4 4M10 8l-4 4M14 8l4 4M18 8l-4 4M8 16h8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},mask:{viewBox:"0 0 24 24",path:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM8 9h.01M16 9h.01M4 13h16M5 14c1 2 3 4 7 4s6-2 7-4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}},Ss={car:{viewBox:"0 0 24 24",path:"M5 11l1.5-4.5h11L19 11M5 17h1m13 0h1M6 13v4m12-4v4M5 17h14a1 1 0 001-1v-5H4v5a1 1 0 001 1z M7.5 6.5l.5 1h8l.5-1a1 1 0 00-1-1H8.5a1 1 0 00-1 1z M7 16a1 1 0 100-2 1 1 0 000 2z M17 16a1 1 0 100-2 1 1 0 000 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},truck:{viewBox:"0 0 24 24",path:"M1 3h15v13H1zM16 8h4l3 3v5h-7V8z M5.5 21a2.5 2.5 0 100-5 2.5 2.5 0 000 5z M18.5 21a2.5 2.5 0 100-5 2.5 2.5 0 000 5z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},van:{viewBox:"0 0 24 24",path:"M3 6h13v11H3z M16 6h2l3 4v7h-5V6z M7 20.5a1.5 1.5 0 100-3 1.5 1.5 0 000 3z M17 20.5a1.5 1.5 0 100-3 1.5 1.5 0 000 3z M3 10h13",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},motorcycle:{viewBox:"0 0 24 24",path:"M5 19a3 3 0 100-6 3 3 0 000 6z M19 19a3 3 0 100-6 3 3 0 000 6z M12 4l-3 7h5.5L18 8m-4 3l3 8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},bicycle:{viewBox:"0 0 24 24",path:"M5 19a3 3 0 100-6 3 3 0 000 6z M19 19a3 3 0 100-6 3 3 0 000 6z M12 11l2-5h3M12 19v-8m0 0L9 8M12 11l3-3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},bus:{viewBox:"0 0 24 24",path:"M4 6a2 2 0 012-2h12a2 2 0 012 2v11a3 3 0 01-3 3H7a3 3 0 01-3-3V6z M4 10h16M8 20v-2M16 20v-2M8 14h.01M16 14h.01M4 6h16",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},taxi:{viewBox:"0 0 24 24",path:"M5 11l1.5-4.5h11L19 11M5 17h1m13 0h1M6 13v4m12-4v4M5 17h14a1 1 0 001-1v-5H4v5a1 1 0 001 1z M9 4h6v2H9V4z M7 16a1 1 0 100-2 1 1 0 000 2z M17 16a1 1 0 100-2 1 1 0 000 2z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},parking:{viewBox:"0 0 24 24",path:"M4 4h16a2 2 0 012 2v12a2 2 0 01-2 2H4a2 2 0 01-2-2V6a2 2 0 012-2z M9 8v8M9 8h3.5a2.5 2.5 0 010 5H9",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},fuel:{viewBox:"0 0 24 24",path:"M3 4h10v12H3z M13 7h2a2 2 0 012 2v7a2 2 0 002 2M14 7V4M3 10h10M5 20v-4M11 20v-4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},garage:{viewBox:"0 0 24 24",path:"M2 9l10-7 10 7v11a2 2 0 01-2 2H4a2 2 0 01-2-2V9z M7 21V13h10v8M2 9h20",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},road:{viewBox:"0 0 24 24",path:"M6 4h2v16H6zM16 4h2v16h-2zM12 4v4M12 12v4M12 20v1",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},rocket:{viewBox:"0 0 24 24",path:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z M12 15l-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11A22.35 22.35 0 0 1 15 15z M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}};var As={code:{viewBox:"0 0 24 24",path:"M16 18l6-6-6-6M8 6l-6 6 6 6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"git-branch":{viewBox:"0 0 24 24",path:"M6 3v12M18 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM6 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM18 9c-3 0-6 3-6 6v3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},terminal:{viewBox:"0 0 24 24",path:"M4 17l6-6-6-6M12 19h8",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},bold:{viewBox:"0 0 24 24",path:"M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6V4zm0 8h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6v-8z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},italic:{viewBox:"0 0 24 24",path:"M19 4h-9M14 20H5M15 4L9 20",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},underline:{viewBox:"0 0 24 24",path:"M6 3v7a6 6 0 0 0 6 6 6 6 0 0 0 6-6V3M4 21h16",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},strikethrough:{viewBox:"0 0 24 24",path:"M17.3 4.9c-2.3-.6-4.4-1-6.2-.9-2.7.1-5.3 1.1-6.6 3.1-.5.8-.7 1.7-.7 2.6 0 1.7.8 3.1 2 4M3 12h18M13 20c2 0 3.5-.5 4.5-1.5 1-.9 1.5-2.2 1.5-3.5 0-1.3-.5-2.5-1.4-3.4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"heading-1":{viewBox:"0 0 24 24",path:"M4 12h8m-8 6V6m8 12V6m5 6h3m0 0V6m0 6v6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"heading-2":{viewBox:"0 0 24 24",path:"M4 12h8m-8 6V6m8 12V6m5 10.5c0-2.5 4-2.5 4 0s-4 2.5-4 5m4 0h-4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"heading-3":{viewBox:"0 0 24 24",path:"M4 12h8m-8 6V6m8 12V6m5 4.5h3a1.5 1.5 0 0 1 0 3 1.5 1.5 0 0 1 0 3h-3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"list-bullet":{viewBox:"0 0 24 24",path:"M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"list-numbered":{viewBox:"0 0 24 24",path:"M10 6h11M10 12h11M10 18h11M4 6h1v4M4 10h2M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},quote:{viewBox:"0 0 24 24",path:"M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V20c0 1 0 1 1 1zM15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1z",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"code-inline":{viewBox:"0 0 24 24",path:"M16 18l6-6-6-6M8 6l-6 6 6 6",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"code-block":{viewBox:"0 0 24 24",path:"M16 18l6-6-6-6M8 6l-6 6 6 6M14 4l-4 16",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"link-add":{viewBox:"0 0 24 24",path:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"image-add":{viewBox:"0 0 24 24",path:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},undo:{viewBox:"0 0 24 24",path:"M3 7v6h6M21 17a9 9 0 0 0-9-9 9 9 0 0 0-9 9",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},redo:{viewBox:"0 0 24 24",path:"M21 7v6h-6M3 17a9 9 0 0 1 9-9 9 9 0 0 1 9 9",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"text-left":{viewBox:"0 0 24 24",path:"M3 6h18M3 12h12M3 18h18",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"text-center":{viewBox:"0 0 24 24",path:"M3 6h18M6 12h12M3 18h18",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"text-right":{viewBox:"0 0 24 24",path:"M3 6h18M9 12h12M3 18h18",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},indent:{viewBox:"0 0 24 24",path:"M3 6h18M3 12h18M3 18h18M3 9l4 3-4 3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},outdent:{viewBox:"0 0 24 24",path:"M3 6h18M3 12h18M3 18h18M7 9l-4 3 4 3",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},embed:{viewBox:"0 0 24 24",path:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10zM8 10h8M8 14h4",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},"clear-format":{viewBox:"0 0 24 24",path:"M4 7V4h16v3M9 20h6M12 4v16",stroke:"currentColor",fill:"none",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}};const $s={...us,...ps,...ms,...fs,...gs,...vs,...ys,...bs,...ks,..._s,...ws,...Ms,...xs,...Ls,...Cs,...Es,...Ss,...As},zs={ui:{name:"UI",description:"Core user interface icons",icons:Object.keys(us)},communication:{name:"Communication",description:"Messaging and notifications",icons:Object.keys(ps)},media:{name:"Media",description:"Audio, video, and images",icons:Object.keys(ms)},files:{name:"Files",description:"Documents and file operations",icons:Object.keys(fs)},social:{name:"Social",description:"Social interactions and sharing",icons:Object.keys(gs)},commerce:{name:"Commerce",description:"Shopping and payments",icons:Object.keys(vs)},status:{name:"Status",description:"Indicators and alerts",icons:Object.keys(ys)},navigation:{name:"Navigation",description:"Directional and navigation",icons:Object.keys(bs)},seasonal:{name:"Seasonal",description:"Festive and holiday icons",icons:Object.keys(ks)},weather:{name:"Weather",description:"Weather conditions and meteorology",icons:Object.keys(_s)},devices:{name:"Devices",description:"Electronic devices and hardware",icons:Object.keys(ws)},finance:{name:"Finance",description:"Financial and charts",icons:Object.keys(Ms)},health:{name:"Health",description:"Medical and wellness",icons:Object.keys(xs)},sport:{name:"Sport",description:"Sports and fitness",icons:Object.keys(Ls)},buildings:{name:"Buildings",description:"Architecture and structures",icons:Object.keys(Cs)},emojis:{name:"Emojis",description:"Emoji expressions and faces",icons:Object.keys(Es)},transport:{name:"Transport",description:"Vehicles and transportation",icons:Object.keys(Ss)},code:{name:"Code & Editor",description:"Text editing, formatting, and code icons",icons:Object.keys(As)}},js="http://www.w3.org/2000/svg";const Bs=new class{constructor(){this._icons={...$s},this._categories={...zs}}render(e,t={}){const n=this._icons[e];if(!n)return console.warn(`Icon "${e}" not found`),null;const{size:o=24,class:s="",colour:i=null,color:r=null,attrs:a={}}=t,l=document.createElementNS(js,"svg");l.setAttribute("viewBox",n.viewBox||"0 0 24 24"),l.setAttribute("width",o),l.setAttribute("height",o),l.setAttribute("fill",n.fill||"none"),l.setAttribute("aria-hidden","true");const d=["dm-icon"];if(s&&d.push(s),l.setAttribute("class",d.join(" ")),n.stroke&&l.setAttribute("stroke",i||r||n.stroke),n.strokeWidth&&l.setAttribute("stroke-width",n.strokeWidth),n.strokeLinecap&&l.setAttribute("stroke-linecap",n.strokeLinecap),n.strokeLinejoin&&l.setAttribute("stroke-linejoin",n.strokeLinejoin),(i||r)&&"currentColor"===n.fill&&l.setAttribute("fill",i||r),Object.entries(a).forEach(([e,t])=>{l.setAttribute(e,t)}),n.path){const e=document.createElementNS(js,"path");e.setAttribute("d",n.path),"currentColor"===n.fill&&e.setAttribute("fill",i||r||"currentColor"),l.appendChild(e)}return n.paths&&n.paths.forEach(e=>{const t=document.createElementNS(js,"path");t.setAttribute("d",e),"currentColor"===n.fill&&t.setAttribute("fill",i||r||"currentColor"),l.appendChild(t)}),l}html(e,t={}){const n=this.render(e,t);if(!n)return"";const o=document.createElement("div");return o.appendChild(n),o.innerHTML}inject(e,t,n={}){const{position:o="prepend",...s}=n,i="string"==typeof e?document.querySelector(e):e;if(!i)return console.warn(`Target element not found: ${e}`),null;const r=this.render(t,s);if(!r)return null;switch(o){case"append":i.appendChild(r);break;case"replace":i.innerHTML="",i.appendChild(r);break;default:i.insertBefore(r,i.firstChild)}return r}scan(e=document){const t="string"==typeof e?document.querySelector(e):e;if(!t)return 0;const n=t.querySelectorAll("[data-icon]:not([data-icon-processed]):not([data-icon-processing])");let o=0;return n.forEach(e=>{if("svg"===e.tagName.toLowerCase()||e.hasAttribute("data-icon-processed")||e.querySelector("svg"))return;const t=e.dataset.icon,n=parseInt(e.dataset.iconSize,10)||24,s=e.dataset.iconColour||e.dataset.iconColor||null,i=e.dataset.iconClass||"",r=this.render(t,{size:n,colour:s,class:i});if(r){const n=e.className;n&&r.classList.add(...n.split(" ").filter(e=>e)),r.setAttribute("data-icon",t),r.setAttribute("data-icon-processed","true"),r.setAttribute("data-original-icon",t),r.setAttribute("data-icon-converted",Date.now().toString()),e.replaceWith(r),o++}else e.setAttribute("data-icon-processed","true")}),o}register(e,t){return e&&t?(t.viewBox||(t.viewBox="0 0 24 24"),t.path||t.paths?(this._icons[e]=t,this._categories.custom||(this._categories.custom={name:"Custom",description:"Custom registered icons",icons:[]}),this._categories.custom.icons.push(e),this):(console.warn(`Icon "${e}" must have a path or paths property`),this)):(console.warn("Invalid icon registration: name and definition required"),this)}unregister(e){if(this._icons[e]){if(delete this._icons[e],this._categories.custom){const t=this._categories.custom.icons.indexOf(e);t>-1&&this._categories.custom.icons.splice(t,1)}return!0}return!1}has(e){return!!this._icons[e]}get(e){return this._icons[e]||null}list(e=null){return e&&this._categories[e]?[...this._categories[e].icons]:Object.keys(this._icons)}listCategories(){return{...this._categories}}count(){return Object.keys(this._icons).length}search(e){const t=e.toLowerCase();return Object.keys(this._icons).filter(e=>e.toLowerCase().includes(t))}createSprite(){const e=document.createElementNS(js,"svg");return e.setAttribute("xmlns",js),e.style.display="none",Object.entries(this._icons).forEach(([t,n])=>{const o=document.createElementNS(js,"symbol");if(o.setAttribute("id",`dm-icon-${t}`),o.setAttribute("viewBox",n.viewBox||"0 0 24 24"),n.path){const e=document.createElementNS(js,"path");e.setAttribute("d",n.path),n.fill&&e.setAttribute("fill",n.fill),n.stroke&&(e.setAttribute("stroke",n.stroke),n.strokeWidth&&e.setAttribute("stroke-width",n.strokeWidth),n.strokeLinecap&&e.setAttribute("stroke-linecap",n.strokeLinecap),n.strokeLinejoin&&e.setAttribute("stroke-linejoin",n.strokeLinejoin)),o.appendChild(e)}n.paths&&n.paths.forEach(e=>{const t=document.createElementNS(js,"path");t.setAttribute("d",e),n.fill&&t.setAttribute("fill",n.fill),n.stroke&&t.setAttribute("stroke",n.stroke),o.appendChild(t)}),e.appendChild(o)}),e}use(e,t={}){if(!this._icons[e])return console.warn(`Icon "${e}" not found`),null;const{size:n=24,class:o=""}=t,s=document.createElementNS(js,"svg");s.setAttribute("width",n),s.setAttribute("height",n),s.setAttribute("aria-hidden","true");const i=["dm-icon"];o&&i.push(o),s.setAttribute("class",i.join(" "));const r=document.createElementNS(js,"use");return r.setAttributeNS("http://www.w3.org/1999/xlink","href",`#dm-icon-${e}`),s.appendChild(r),s}};class Ts{static stripeColors={none:"transparent",lighter:"var(--dm-gray-100, #f8f9fa)",light:"var(--dm-gray-200, #e9ecef)",medium:"var(--dm-gray-300, #dee2e6)",dark:"var(--dm-gray-400, #ced4da)","primary-tint":"rgba(100, 149, 237, 0.05)","success-tint":"rgba(40, 167, 69, 0.05)","warning-tint":"rgba(255, 193, 7, 0.05)","danger-tint":"rgba(220, 53, 69, 0.05)","info-tint":"rgba(23, 162, 184, 0.05)",default:"var(--dm-table-stripe-bg, #f9f9f9)"};static hoverColors={none:"transparent",lighter:"var(--dm-gray-200, #e9ecef)",light:"var(--dm-gray-300, #dee2e6)",medium:"var(--dm-gray-400, #ced4da)",dark:"var(--dm-gray-500, #adb5bd)",default:"var(--dm-hover-bg, #f0f0f0)"};constructor(e,t={}){this.element="string"==typeof e?document.querySelector(e):e,this.options={data:[],columns:[],rowKey:"id",sortable:!0,multiSort:!1,defaultSort:null,filterable:!0,searchable:!0,searchPlaceholder:"Search...",pagination:!0,pageSize:10,pageSizeOptions:[10,25,50,100],selectable:!1,selectionMode:"single",editable:!1,editMode:"cell",resizable:!0,striped:!0,hover:!0,bordered:!0,responsive:!0,evenRowColor:null,oddRowColor:null,hoverColor:null,classes:{wrapper:"domma-table-wrapper",table:"domma-table",header:"domma-table-header",body:"domma-table-body",row:"domma-table-row",cell:"domma-table-cell",selected:"domma-table-selected",sorted:"domma-table-sorted",sortAsc:"domma-table-sort-asc",sortDesc:"domma-table-sort-desc",pagination:"domma-table-pagination",search:"domma-table-search"},exportPanel:!1,exportOptions:["copy","csv","excel","json"],columnToggle:!1,regexSearch:!1,persistSettings:!1,storageKey:null,onSort:null,onFilter:null,onPageChange:null,onSelect:null,onEdit:null,onRender:null,onExport:null,...t},this._originalData=[...this.options.data],this._data=[...this.options.data],this._filteredData=[...this._data],this._currentPage=1,this._pageSize=this.options.pageSize,this._sorts=[],this._filters=[],this._searchQuery="",this._selected=new Set,this._editingCell=null,this._eventListeners=new Map,this._columnDropdownOpen=!1,this._searchIsRegex=!1,this._columns=this.options.columns.map(e=>({key:e.key||e,title:e.title||e.key||e,sortable:!1!==e.sortable&&this.options.sortable,filterable:!1!==e.filterable,editable:e.editable||!1,width:e.width||null,render:e.render||null,filterOptions:e.filterOptions||null,visible:!1!==e.visible})),this.options.persistSettings&&this._loadSettings(),this._init()}_init(){this.element&&(this.options.defaultSort&&(this._sorts=[this.options.defaultSort]),this.render())}_resolveColor(e,t,n){return e?t[e]?t[e]:e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")||e.startsWith("var(")?e:n:n}_getRowColors(e){const t=this.options;if(!t.striped)return{background:"transparent",hover:t.hover?this._resolveColor(t.hoverColor,Ts.hoverColors,Ts.hoverColors.default):"transparent"};const n=e%2==1,o=this._resolveColor(t.evenRowColor,Ts.stripeColors,"transparent"),s=this._resolveColor(t.oddRowColor,Ts.stripeColors,Ts.stripeColors.default);return{background:n?s:o,hover:t.hover?this._resolveColor(t.hoverColor,Ts.hoverColors,Ts.hoverColors.default):null}}setData(e){return this._originalData=[...e],this._data=[...e],this._applyFiltersAndSort(),this._currentPage=1,this.render(),this}getData(){return[...this._getPageData()]}getFilteredData(){return[...this._filteredData]}getOriginalData(){return[...this._originalData]}addRow(e){return this._originalData.push(e),this._data.push(e),this._applyFiltersAndSort(),this.render(),this}updateRow(e,t){const n=this._findRowIndex(e);return-1!==n&&(this._originalData[n]={...this._originalData[n],...t},this._data[n]={...this._data[n],...t},this._applyFiltersAndSort(),this.render()),this}removeRow(e){const t=this._findRowIndex(e);return-1!==t&&(this._originalData.splice(t,1),this._data.splice(t,1),this._applyFiltersAndSort(),this.render()),this}_findRowIndex(e){const t=this.options.rowKey;return"number"==typeof e?e:this._originalData.findIndex(n=>n[t]===e)}sort(e,t="asc"){return this._sorts=[{column:e,direction:t}],this._applyFiltersAndSort(),this.render(),this._saveSettings(),this.options.onSort&&this.options.onSort({column:e,direction:t,sorts:this._sorts}),this}sortMultiple(e){return this._sorts=e,this._applyFiltersAndSort(),this.render(),this._saveSettings(),this.options.onSort&&this.options.onSort({sorts:this._sorts}),this}clearSort(){return this._sorts=[],this._applyFiltersAndSort(),this.render(),this._saveSettings(),this}_applySort(e){return 0===this._sorts.length?e:[...e].sort((e,t)=>{for(const n of this._sorts){const{column:o,direction:s}=n,i=e[o],r=t[o];let a=0;if(null==i?a=1:null==r||i<r?a=-1:i>r&&(a=1),0!==a)return"desc"===s?-a:a}return 0})}search(e){return this._searchQuery=this._searchIsRegex?e.trim():e.toLowerCase().trim(),this._applyFiltersAndSort(),this._currentPage=1,this.render(),this.options.onFilter&&this.options.onFilter({query:e,type:"search",isRegex:this._searchIsRegex}),this}setSearchMode(e){return this._searchIsRegex=e,this._searchQuery&&(this._applyFiltersAndSort(),this.render()),this}toggleSearchMode(){return this.setSearchMode(!this._searchIsRegex)}filter(e,t,n="equals"){return this._filters=this._filters.filter(t=>t.column!==e),null!=t&&""!==t&&this._filters.push({column:e,value:t,operator:n}),this._applyFiltersAndSort(),this._currentPage=1,this.render(),this.options.onFilter&&this.options.onFilter({column:e,value:t,operator:n,type:"column"}),this}filterBy(e){return this._customFilter=e,this._applyFiltersAndSort(),this._currentPage=1,this.render(),this}clearFilters(){return this._filters=[],this._searchQuery="",this._customFilter=null,this._applyFiltersAndSort(),this._currentPage=1,this.render(),this}_applyFilters(e){let t=e;if(this._searchQuery)if(this._searchIsRegex)try{const e=new RegExp(this._searchQuery,"i");t=t.filter(t=>this._columns.some(n=>{const o=t[n.key];return null!=o&&e.test(String(o))}))}catch(e){t=[]}else t=t.filter(e=>this._columns.some(t=>{const n=e[t.key];return null!=n&&String(n).toLowerCase().includes(this._searchQuery)}));for(const e of this._filters)t=t.filter(t=>{const n=t[e.column];return this._matchFilter(n,e.value,e.operator)});return this._customFilter&&(t=t.filter(this._customFilter)),t}_matchFilter(e,t,n){if(null==e)return!1;const o=String(e).toLowerCase(),s=String(t).toLowerCase();switch(n){case"equals":default:return o===s;case"contains":return o.includes(s);case"startsWith":return o.startsWith(s);case"endsWith":return o.endsWith(s);case"gt":return Number(e)>Number(t);case"lt":return Number(e)<Number(t);case"gte":return Number(e)>=Number(t);case"lte":return Number(e)<=Number(t);case"between":const[n,i]=t,r=Number(e);return r>=n&&r<=i;case"in":return t.includes(e)}}_applyFiltersAndSort(){this._filteredData=this._applyFilters(this._data),this._filteredData=this._applySort(this._filteredData)}page(e){const t=this._getTotalPages();return this._currentPage=Math.max(1,Math.min(e,t)),this.render(),this.options.onPageChange&&this.options.onPageChange(this.pageInfo()),this}pageSize(e){return this._pageSize=e,this._currentPage=1,this.render(),this._saveSettings(),this}nextPage(){return this.page(this._currentPage+1)}prevPage(){return this.page(this._currentPage-1)}firstPage(){return this.page(1)}lastPage(){return this.page(this._getTotalPages())}pageInfo(){const e=this._getTotalPages();return{page:this._currentPage,pageSize:this._pageSize,totalPages:e,totalRows:this._filteredData.length,startRow:(this._currentPage-1)*this._pageSize+1,endRow:Math.min(this._currentPage*this._pageSize,this._filteredData.length)}}_getTotalPages(){return this.options.pagination&&Math.ceil(this._filteredData.length/this._pageSize)||1}_getPageData(){if(!this.options.pagination)return this._filteredData;const e=(this._currentPage-1)*this._pageSize,t=e+this._pageSize;return this._filteredData.slice(e,t)}select(e){if(!this.options.selectable)return this;const t=this.options.rowKey,n="object"==typeof e?e[t]:e;return"single"===this.options.selectionMode&&this._selected.clear(),this._selected.add(n),this.render(),this.options.onSelect&&this.options.onSelect(this.getSelected()),this}deselect(e){const t=this.options.rowKey,n="object"==typeof e?e[t]:e;return this._selected.delete(n),this.render(),this.options.onSelect&&this.options.onSelect(this.getSelected()),this}toggleSelect(e){const t=this.options.rowKey,n="object"==typeof e?e[t]:e;return this._selected.has(n)?this.deselect(e):this.select(e),this}selectAll(){if(!this.options.selectable||"single"===this.options.selectionMode)return this;const e=this.options.rowKey;for(const t of this._filteredData)this._selected.add(t[e]);return this.render(),this.options.onSelect&&this.options.onSelect(this.getSelected()),this}deselectAll(){return this._selected.clear(),this.render(),this.options.onSelect&&this.options.onSelect([]),this}getSelected(){const e=this.options.rowKey;return this._filteredData.filter(t=>this._selected.has(t[e]))}isSelected(e){const t=this.options.rowKey,n="object"==typeof e?e[t]:e;return this._selected.has(n)}_getStorageKey(){return this.options.storageKey||(this.element.id?`domma-table-${this.element.id}`:"domma-table-default")}_loadSettings(){try{const e=this._getStorageKey(),t=J.get(e);t&&t.columns&&t.columns.forEach(e=>{const t=this._columns.find(t=>t.key===e.key);t&&(t.visible=e.visible,e.width&&(t.width=e.width))}),t&&t.pageSize&&this.options.pagination&&(this._pageSize=t.pageSize,this.options.pageSize=t.pageSize),t&&t.sorts&&this.options.sortable&&(this._sorts=t.sorts)}catch(e){console.warn("Failed to load table settings:",e)}}_saveSettings(){if(this.options.persistSettings)try{const e=this._getStorageKey(),t={columns:this._columns.map(e=>({key:e.key,visible:e.visible,width:e.width})),pageSize:this._pageSize,sorts:this._sorts,timestamp:Date.now()};J.set(e,t)}catch(e){console.warn("Failed to save table settings:",e)}}clearSettings(){if(this.options.persistSettings){const e=this._getStorageKey();J.remove(e)}}showColumn(e){const t=this._columns.find(t=>t.key===e);return t&&(t.visible=!0,this.render(),this._saveSettings()),this}hideColumn(e){const t=this._columns.find(t=>t.key===e);return t&&(t.visible=!1,this.render(),this._saveSettings()),this}toggleColumn(e){const t=this._columns.find(t=>t.key===e);return t&&(t.visible=!t.visible,this.render(),this._saveSettings()),this}getVisibleColumns(){return this._columns.filter(e=>e.visible)}getHiddenColumns(){return this._columns.filter(e=>!e.visible)}resizeColumn(e,t){const n=this._columns.find(t=>t.key===e);return n&&(n.width=t,this.render()),this}getColumns(){return[...this._columns]}editCell(e,t){return this.options.editable?(this._editingCell={rowIndex:e,column:t},this.render(),this):this}saveEdits(){return this._editingCell=null,this.render(),this}cancelEdits(){return this._editingCell=null,this.render(),this}toCSV(e={}){const{columns:t=this._columns.filter(e=>e.visible),includeHeaders:n=!0}=e,o=[],s=this._getExportData();n&&o.push(t.map(e=>`"${e.title}"`).join(","));for(const e of s){const n=t.map(t=>{const n=e[t.key];return null==n?'""':`"${String(n).replace(/"/g,'""')}"`});o.push(n.join(","))}return o.join("\n")}_getExportData(){const e=this.getSelected();return e.length>0?e:this._filteredData}toJSON(e={}){const{columns:t=this._columns.filter(e=>e.visible),pretty:n=!1}=e,o=t.map(e=>e.key),s=this._getExportData().map(e=>{const t={};for(const n of o)t[n]=e[n];return t});return n?JSON.stringify(s,null,2):JSON.stringify(s)}download(e,t){let n,o;switch(e){case"csv":n=this.toCSV(),o="text/csv",t=t||"data.csv";break;case"excel":n=this.toExcel(),o="application/vnd.ms-excel",t=t||"data.xls";break;default:n=this.toJSON({pretty:!0}),o="application/json",t=t||"data.json"}const s=new Blob([n],{type:o}),i=URL.createObjectURL(s),r=document.createElement("a");if(r.href=i,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(i),this.options.onExport){const n=this._getExportData(),o=this.getSelected();this.options.onExport({format:e,filename:t,rowCount:n.length,selectedOnly:o.length>0})}}toExcel(e={}){const{columns:t=this._columns.filter(e=>e.visible)}=e,n=this._getExportData();let o='\n <html xmlns:o="urn:schemas-microsoft-com:office:office"\n xmlns:x="urn:schemas-microsoft-com:office:excel">\n <head>\n <meta charset="UTF-8">\n \x3c!--[if gte mso 9]>\n <xml>\n <x:ExcelWorkbook>\n <x:ExcelWorksheets>\n <x:ExcelWorksheet>\n <x:Name>Data</x:Name>\n <x:WorksheetOptions>\n <x:DisplayGridlines/>\n </x:WorksheetOptions>\n </x:ExcelWorksheet>\n </x:ExcelWorksheets>\n </x:ExcelWorkbook>\n </xml>\n <![endif]--\x3e\n <style>\n table { border-collapse: collapse; }\n th, td { border: 1px solid #000; padding: 8px; }\n th { background: #f0f0f0; font-weight: bold; }\n </style>\n </head>\n <body>\n <table>\n <thead>\n <tr>';for(const e of t)o+=`<th>${this._escapeHtml(e.title)}</th>`;o+="</tr></thead><tbody>";for(const e of n){o+="<tr>";for(const n of t){const t=e[n.key];o+=`<td>${null!=t?this._escapeHtml(String(t)):""}</td>`}o+="</tr>"}return o+="</tbody></table></body></html>",o}async copyToClipboard(e="text"){let t;const n=this._getExportData();if("json"===e)t=this.toJSON({pretty:!0});else if("csv"===e)t=this.toCSV();else{const e=this._columns.filter(e=>e.visible),o=[];o.push(e.map(e=>e.title).join("\t"));for(const t of n)o.push(e.map(e=>t[e.key]??"").join("\t"));t=o.join("\n")}return await c.copyToClipboard(t),this.options.onExport&&this.options.onExport({format:"clipboard",rowCount:this._filteredData.length}),this}_escapeHtml(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}render(){if(!this.element)return this;const e=this.options,t=e.classes,n=this._columns.filter(e=>e.visible),o=this._getPageData();this._restoreIconsBeforeRebuild(),this.element.innerHTML="",this._clearEventListeners();const s=document.createElement("div");s.className=t.wrapper;const i=document.createElement("div");if(i.className="domma-table-toolbar",e.searchable){const t=document.createElement("div");t.className="domma-table-search-wrapper";const n=document.createElement("input");if(n.type="text",n.className="domma-table-search-input"+(this._searchIsRegex?" regex-mode":""),n.placeholder=this._searchIsRegex?"Regex pattern...":e.searchPlaceholder,n.value=this._searchQuery,this._addEventHandler(n,"input",c.debounce(e=>{this.search(e.target.value)},300)),t.appendChild(n),e.regexSearch){const e=document.createElement("button");e.type="button",e.className="domma-table-regex-button"+(this._searchIsRegex?" active":""),e.title=this._searchIsRegex?"Regex mode (click for text)":"Text mode (click for regex)",e.innerHTML=".*",this._addEventHandler(e,"click",()=>{this._searchIsRegex=!this._searchIsRegex,this._searchQuery&&(this._searchQuery=this._searchIsRegex?n.value.trim():n.value.toLowerCase().trim(),this._applyFiltersAndSort()),this.render()}),t.appendChild(e)}i.appendChild(t)}if(e.columnToggle){const e=document.createElement("div");e.className="domma-table-column-toggle";const t=document.createElement("button");t.type="button",t.className="domma-table-column-button",t.innerHTML=`${Bs.html("columns",{size:16})} Columns`;const n=document.createElement("div");n.className="domma-column-dropdown"+(this._columnDropdownOpen?" show":"");for(const e of this._columns){const t=document.createElement("label");t.className="domma-column-toggle-item";const o=document.createElement("span");o.className="domma-column-toggle-label",o.textContent=e.title;const s=document.createElement("div");s.className="domma-toggle-switch";const i=document.createElement("input");i.type="checkbox",i.checked=e.visible,i.style.cssText="opacity: 0; width: 0; height: 0; position: absolute;";const r=document.createElement("span");r.className="domma-toggle-track"+(e.visible?" active":"");const a=document.createElement("span");a.className="domma-toggle-knob"+(e.visible?" active":""),r.appendChild(a),s.appendChild(i),s.appendChild(r),this._addEventHandler(t,"click",t=>{t.preventDefault(),t.stopPropagation(),e.visible=!e.visible,e.visible?(r.classList.add("active"),a.classList.add("active")):(r.classList.remove("active"),a.classList.remove("active")),i.checked=e.visible,this._columnDropdownOpen=!0,this.render(),this._saveSettings()}),t.appendChild(o),t.appendChild(s),n.appendChild(t)}this._addEventHandler(t,"click",e=>{e.stopPropagation(),this._columnDropdownOpen=!this._columnDropdownOpen,this._columnDropdownOpen?n.classList.add("show"):n.classList.remove("show")}),this._addEventHandler(document,"click",()=>{this._columnDropdownOpen&&(this._columnDropdownOpen=!1,n.classList.remove("show"))}),this._addEventHandler(n,"click",e=>{e.stopPropagation()}),e.appendChild(t),e.appendChild(n),i.appendChild(e)}if(e.exportPanel){const t=document.createElement("div");t.className="domma-table-export-wrapper";let n=!1;const o=document.createElement("div");o.className="domma-export-mode-toggle";const s=document.createElement("span");s.className="domma-export-mode-label active",s.textContent="Copy";const r=document.createElement("label");r.className="domma-export-toggle-switch";const a=document.createElement("input");a.type="checkbox",a.className="domma-export-toggle-input";const l=document.createElement("span");l.className="domma-export-toggle-slider";const d=document.createElement("span");d.className="domma-export-toggle-knob",l.appendChild(d),r.appendChild(a),r.appendChild(l);const c=document.createElement("span");c.className="domma-export-mode-label",c.textContent="Download";const h=()=>{n?(l.classList.add("active"),d.classList.add("active"),s.classList.remove("active"),c.classList.add("active")):(l.classList.remove("active"),d.classList.remove("active"),s.classList.add("active"),c.classList.remove("active"))};this._addEventHandler(a,"change",()=>{n=a.checked,h()}),h(),o.appendChild(s),o.appendChild(r),o.appendChild(c),t.appendChild(o);const u=document.createElement("span");u.className="domma-export-separator",t.appendChild(u);const p={text:{label:"Text",icon:Bs.html("clipboard",{size:16}),format:"text"},csv:{label:"CSV",icon:Bs.html("document",{size:16}),format:"csv"},excel:{label:"Excel",icon:Bs.html("grid",{size:16}),format:"excel"},json:{label:"JSON",icon:Bs.html("file-code",{size:16}),format:"json"}},m=e.exportOptions.map(e=>"copy"===e?"text":e);for(const e of m){const o=p[e];if(!o)continue;const s=document.createElement("button");s.type="button",s.className="domma-export-button",s.setAttribute("data-export",e),s.innerHTML=`${o.icon} ${o.label}`;const i=(e,t=!0)=>{const n=s.innerHTML;s.innerHTML=e,s.classList.add(t?"success":"error"),setTimeout(()=>{s.innerHTML=n,s.classList.remove("success","error")},1500)};this._addEventHandler(s,"click",()=>{const e=this.getSelected(),t=e.length>0?e.length:this._filteredData.length,s=e.length>0?` (${t} selected)`:` (${t} rows)`;if(n){const e="text"===o.format?"csv":o.format;this.download(e),i("✓ Downloaded!"+s)}else{const e="excel"===o.format?"text":o.format;this.copyToClipboard(e),i("✓ Copied!"+s)}}),t.appendChild(s)}i.appendChild(t)}(e.searchable||e.columnToggle||e.exportPanel)&&s.appendChild(i);const r=document.createElement("table");r.className=t.table,r.style.cssText="width: 100%; border-collapse: collapse;";const a=document.createElement("thead");a.className=t.header;const l=document.createElement("tr");if(e.selectable&&"multiple"===e.selectionMode){const e=document.createElement("th");e.style.cssText="padding: 12px; border: 1px solid var(--dm-border, #ddd); background: var(--dm-table-header-bg, var(--dm-background-alt, #f8f9fa)); width: 40px;";const t=document.createElement("input");t.type="checkbox",t.checked=this._selected.size>0&&this._selected.size===o.length,this._addEventHandler(t,"change",()=>{t.checked?this.selectAll():this.deselectAll()}),e.appendChild(t),l.appendChild(e)}for(const e of n){const n=document.createElement("th");n.style.cssText="padding: 12px; border: 1px solid var(--dm-border, #ddd); background: var(--dm-table-header-bg, var(--dm-background-alt, #f8f9fa)); text-align: left;",e.width&&(n.style.width="number"==typeof e.width?e.width+"px":e.width);const o=this._sorts.find(t=>t.column===e.key);o&&(n.classList.add(t.sorted),n.classList.add("asc"===o.direction?t.sortAsc:t.sortDesc)),e.sortable?(n.style.cursor="pointer",n.innerHTML=`${e.title} <span style="opacity: 0.5">${o?"asc"===o.direction?"▲":"▼":"⇅"}</span>`,this._addEventHandler(n,"click",()=>{const t=this._sorts.find(t=>t.column===e.key),n="asc"===t?.direction?"desc":"asc";this.sort(e.key,n)})):n.textContent=e.title,l.appendChild(n)}a.appendChild(l),r.appendChild(a);const d=document.createElement("tbody");d.className=t.body;const h=e.rowKey;if(o.forEach((o,s)=>{const i=document.createElement("tr");i.className=t.row;const r=this._getRowColors(s);if(i.style.background=r.background,e.hover&&r.hover){i.style.transition="background 0.2s";const e=r.background;this._addEventHandler(i,"mouseenter",()=>i.style.background=r.hover),this._addEventHandler(i,"mouseleave",()=>i.style.background=e)}if(this._selected.has(o[h])&&(i.classList.add(t.selected),i.style.background="var(--dm-primary-light, #e3f2fd)"),e.selectable&&"multiple"===e.selectionMode){const e=document.createElement("td");e.style.cssText="padding: 12px; border: 1px solid var(--dm-border, #ddd);";const t=document.createElement("input");t.type="checkbox",t.checked=this._selected.has(o[h]),this._addEventHandler(t,"change",()=>{this.toggleSelect(o[h])}),e.appendChild(t),i.appendChild(e)}e.selectable&&"single"===e.selectionMode&&(i.style.cursor="pointer",this._addEventHandler(i,"click",()=>{this.toggleSelect(o[h])}));for(const r of n){const n=document.createElement("td");n.className=t.cell,n.style.cssText="padding: 12px; border: 1px solid var(--dm-border, #ddd);";if(this._editingCell&&this._editingCell.rowIndex===s&&this._editingCell.column===r.key&&r.editable){const t=document.createElement("input");t.type="text",t.value=o[r.key]||"",t.style.cssText="width: 100%; padding: 4px; border: 1px solid var(--dm-primary, #007bff);",this._addEventHandler(t,"blur",()=>{this.updateRow(o[h],{[r.key]:t.value}),this.saveEdits(),e.onEdit&&e.onEdit({row:o,column:r.key,oldValue:o[r.key],newValue:t.value})}),this._addEventHandler(t,"keydown",e=>{"Enter"===e.key?t.blur():"Escape"===e.key&&this.cancelEdits()}),n.appendChild(t),setTimeout(()=>t.focus(),0)}else r.render?n.innerHTML=r.render(o[r.key],o,s):n.textContent=o[r.key]??"",r.editable&&e.editable&&(n.style.cursor="pointer",this._addEventHandler(n,"dblclick",()=>{this.editCell(s,r.key)}));i.appendChild(n)}d.appendChild(i)}),r.appendChild(d),s.appendChild(r),e.pagination){const n=document.createElement("div");n.className=t.pagination,n.style.cssText="display: flex; justify-content: space-between; align-items: center; margin-top: 15px; padding: 10px 0;";const o=this.pageInfo(),i=document.createElement("span");i.textContent=`Showing ${o.startRow}-${o.endRow} of ${o.totalRows}`;const r=document.createElement("span");r.innerHTML="Show ";const a=document.createElement("select");a.className="form-select",a.style.cssText="width: auto; display: inline-block; margin: 0 5px;";for(const t of e.pageSizeOptions){const e=document.createElement("option");e.value=t,e.textContent=t,t===this._pageSize&&(e.selected=!0),a.appendChild(e)}this._addEventHandler(a,"change",()=>{this.pageSize(Number(a.value))}),r.appendChild(a),r.appendChild(document.createTextNode(" entries"));const l=document.createElement("span"),d=(e,t,n=!1,o=!1)=>{const s=document.createElement("button");return o?s.innerHTML=e:s.textContent=e,s.disabled=n,s.style.cssText="padding: 6px 12px; margin: 0 2px; border: 1px solid var(--dm-border, #ddd); background: var(--dm-surface, #fff); cursor: pointer; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center;",n&&(s.style.opacity="0.5"),this._addEventHandler(s,"click",t),s};l.appendChild(d(Bs.html("chevrons-left",{size:14}),()=>this.firstPage(),1===this._currentPage,!0)),l.appendChild(d(Bs.html("chevron-left",{size:14}),()=>this.prevPage(),1===this._currentPage,!0));const c=5;let h=Math.max(1,this._currentPage-Math.floor(c/2)),u=Math.min(o.totalPages,h+c-1);h=Math.max(1,u-c+1);for(let e=h;e<=u;e++){const t=d(e,()=>this.page(e),!1);e===this._currentPage&&(t.style.background="var(--dm-primary, #007bff)",t.style.color="#fff",t.style.borderColor="var(--dm-primary, #007bff)"),l.appendChild(t)}l.appendChild(d(Bs.html("chevron-right",{size:14}),()=>this.nextPage(),this._currentPage===o.totalPages,!0)),l.appendChild(d(Bs.html("chevrons-right",{size:14}),()=>this.lastPage(),this._currentPage===o.totalPages,!0)),n.appendChild(r),n.appendChild(i),n.appendChild(l),s.appendChild(n)}return this.element.appendChild(s),this._reinitRenderedContent(),e.onRender&&e.onRender(this),this}_reinitRenderedContent(){try{Bs.scan(this.element)}catch{}const e="undefined"!=typeof window&&window.Domma&&window.Domma.elements&&window.Domma.elements.tooltip;"function"==typeof e&&this.element.querySelectorAll("[data-tooltip]").forEach(t=>{try{e(t,{position:"top",trigger:"hover",delay:{show:200,hide:0}})}catch{}})}_addEventHandler(e,t,n){e.addEventListener(t,n),this._eventListeners.has(e)||this._eventListeners.set(e,[]),this._eventListeners.get(e).push({event:t,handler:n})}_clearEventListeners(){for(const[e,t]of this._eventListeners)for(const{event:n,handler:o}of t)e.removeEventListener(n,o);this._eventListeners.clear()}_restoreIconsBeforeRebuild(){this.element.querySelectorAll('svg[data-icon-processed="true"][data-original-icon]').forEach(e=>{const t=e.getAttribute("data-original-icon");if(t){const n=document.createElement("span");n.setAttribute("data-icon",t);const o=e.getAttribute("data-icon-size"),s=e.getAttribute("data-icon-color")||e.getAttribute("data-icon-colour"),i=e.getAttribute("data-icon-class");o&&n.setAttribute("data-icon-size",o),s&&n.setAttribute("data-icon-colour",s),i&&n.setAttribute("data-icon-class",i),e.replaceWith(n)}})}on(e,t){if(["sort","filter","page","select","edit","render"].includes(e)){const n="on"+e.charAt(0).toUpperCase()+e.slice(1);this.options[n]=t}return this}off(e){const t="on"+e.charAt(0).toUpperCase()+e.slice(1);return this.options[t]=null,this}refresh(){return this._applyFiltersAndSort(),this.render(),this}destroy(){this._clearEventListeners(),this.element&&(this.element.innerHTML="")}}const Ws={_instances:new Map,create(e,t={}){const n="string"==typeof e?document.querySelector(e):e,o=new Ts(n,t);return n&&this._instances.set(n,o),o},get(e){const t="string"==typeof e?document.querySelector(e):e;return this._instances.get(t)},destroy(e){const t="string"==typeof e?document.querySelector(e):e,n=this._instances.get(t);n&&(n.destroy(),this._instances.delete(t))},destroyAll(){for(const e of this._instances.values())e.destroy();this._instances.clear()}},Hs="domma-theme",Is="domma-theme-variant",Ds="dm-theme-",Os=["ocean-light","ocean-dark","forest-light","forest-dark","sunset-light","sunset-dark","royal-light","royal-dark","lemon-light","lemon-dark","silver-light","silver-dark","charcoal-light","charcoal-dark","christmas-light","christmas-dark","unicorn-light","unicorn-dark","dreamy-light","dreamy-dark","grayve-light","grayve-dark","mint-light","mint-dark","wedding-light","wedding-dark","core-light","admin-smooth-steel","admin-smooth-indigo","admin-smooth-teal","admin-sharp-steel","admin-sharp-indigo","admin-sharp-teal"],Ns="charcoal-dark";const Vs=new class{constructor(){this._theme=Ns,this._listeners=[],this._target=null,this._initialised=!1,this._systemMediaQuery=null,this._autoDetect=!1,this._disabled=!1}init(e={}){const{theme:t=null,autoDetect:n=!1,persist:o=!0,disabled:s=!1,target:i=document.body}=e;if(s)return this._disabled=!0,this._initialised=!0,this;this._target="string"==typeof i?document.querySelector(i):i,this._target||(this._target=document.body),this._persist=o,this._autoDetect=n;let r=t;if(o){const e=this._loadFromStorage();e&&!t&&(r=e)}if(n&&!r){r="dark"===this._getSystemPreference()?"charcoal-dark":"charcoal-light",this._setupSystemListener()}return r=r||Ns,Os.includes(r)||(console.warn(`Invalid theme: ${r}. Using default: ${Ns}`),r=Ns),this._theme=r,this._applyTheme(),this._initialised=!0,this}get(){return this._theme}getBase(){return this._theme.split("-").slice(0,-1).join("-")}getMode(){return this._theme.split("-").pop()}isDark(){return"dark"===this.getMode()}isLight(){return"light"===this.getMode()}set(e){if(!Os.includes(e))return console.warn(`Invalid theme: ${e}. Available themes: ${Os.join(", ")}`),this;const t=this._theme;return t===e||(this._theme=e,this._applyTheme(),this._saveToStorage(),this._notifyListeners(t,e)),this}setVariant(){return console.warn('[ThemeEngine] setVariant() is deprecated. Use set() with full theme name (e.g., set("ocean-dark"))'),this}toggle(){return console.warn("[ThemeEngine] toggle() is deprecated. Use variant selector UI or set() method."),this}onChange(e){return"function"!=typeof e?(console.warn("onChange requires a function callback"),()=>{}):(this._listeners.push(e),()=>{const t=this._listeners.indexOf(e);t>-1&&this._listeners.splice(t,1)})}preview(e){if(!Os.includes(e))return console.warn(`Invalid theme for preview: ${e}`),()=>{};const t=this._theme;return this._theme=e,this._applyTheme(!1),()=>{this._theme=t,this._applyTheme(!1)}}listThemes(){return[...Os]}listBases(){return["ocean","forest","sunset","royal","lemon","silver","charcoal","christmas","unicorn","dreamy","grayve","mint","wedding","admin-smooth","admin-sharp"]}listVariants(){return console.warn("[ThemeEngine] listVariants() is deprecated. Use listThemes() instead."),this.listBases()}getConfig(){return{theme:this._theme,base:this.getBase(),mode:this.getMode(),autoDetect:this._autoDetect,persist:this._persist,disabled:this._disabled}}_updateMetaThemeColor(){const e={light:"#ffffff",dark:"#121212"};let t=document.querySelector('meta[name="theme-color"]');t||(t=document.createElement("meta"),t.name="theme-color",document.head.appendChild(t)),t.content=e[this.getMode()]||e.dark}isDisabled(){return this._disabled}enable(){return this._disabled=!1,this._target||(this._target=document.body),this._applyTheme(),this}disable(){if(this._disabled=!0,this._target){const e=this._target.className.split(" ").filter(e=>!e.startsWith(Ds));this._target.className=e.join(" ").trim(),this._target.removeAttribute("data-mode")}return this}_applyTheme(e=!0){if(this._disabled)return;const t=this._target||document.body;if(!t)return void console.error("[ThemeEngine] No target element available for theme application");const n=t.className.split(" ").filter(e=>!e.startsWith(Ds));n.push(`${Ds}${this._theme}`),t.className=n.join(" ").trim();const o=this.isDark()?"dark":"light";t.setAttribute("data-mode",o),e&&this._updateMetaThemeColor()}_saveToStorage(){if(this._persist&&"undefined"!=typeof localStorage)try{localStorage.setItem(Hs,this._theme),localStorage.removeItem(Is)}catch(e){}}_loadFromStorage(){if("undefined"==typeof localStorage)return null;try{const e=localStorage.getItem(Hs);if(e&&Os.includes(e))return e;const t=e,n=localStorage.getItem(Is);if(t&&["light","dark"].includes(t)){const e=`${n||"charcoal"}-${t}`;if(console.log(`[ThemeEngine] Migrating theme: ${t} + ${n} → ${e}`),Os.includes(e))return localStorage.setItem(Hs,e),localStorage.removeItem(Is),e}return null}catch(e){return null}}_getSystemPreference(){return"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}_setupSystemListener(){if("undefined"==typeof window||!window.matchMedia)return;this._systemMediaQuery=window.matchMedia("(prefers-color-scheme: dark)");const e=e=>{if(!this._autoDetect)return;const t=e.matches?"dark":"light",n=`${this.getBase()}-${t}`;Os.includes(n)&&this.set(n)};this._systemMediaQuery.addEventListener?this._systemMediaQuery.addEventListener("change",e):this._systemMediaQuery.addListener(e)}_notifyListeners(e,t){this._listeners.forEach(n=>{try{n(e,t)}catch(e){console.error("[ThemeEngine] Error in change listener:",e)}})}destroy(){this._systemMediaQuery&&this._systemMediaQuery.removeEventListener,this._listeners=[],this._target=null,this._initialised=!1}};"undefined"!=typeof document&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{Vs._initialised||Vs.init({persist:!0,autoDetect:!1})}):Vs._initialised||Vs.init({persist:!0,autoDetect:!1}));const Ps={apiUrl:null,token:null,user:null,config:{},eventHandlers:{},initialized:!1,init(e={}){this.config={apiUrl:e.apiUrl||(()=>{if("undefined"==typeof window)return"http://localhost:3000/api";const{hostname:e,origin:t}=window.location;return"localhost"===e||"127.0.0.1"===e?`http://${e}:3000/api`:`${t}/api`})(),storageKey:e.storageKey||"auth_token",userStorageKey:e.userStorageKey||"auth_user",autoCheck:!1!==e.autoCheck},this.apiUrl=this.config.apiUrl,this.token=J.get(this.config.storageKey),this.user=J.get(this.config.userStorageKey),this.config.autoCheck&&this.token&&this._verifyToken().catch(()=>{this._clearToken(),this.emit("tokenExpired",null)}),this.initialized=!0},async login(e,t){if(!this.initialized)throw new Error("Auth module not initialized. Call auth.init() first.");try{const n=await d.post(`${this.apiUrl}/auth/login`,{email:e,password:t});if(!n.success||!n.token)throw new Error(n.message||"Login failed");return this.token=n.token,this.user=n.user,this._storeToken(this.token),this._storeUser(this.user),this.emit("login",this.user),this.user}catch(e){throw this.emit("error",e.message||"Login failed"),e}},async register(e,t,n){if(!this.initialized)throw new Error("Auth module not initialized. Call auth.init() first.");try{const o=await d.post(`${this.apiUrl}/auth/register`,{email:e,password:t,name:n});if(!o.success||!o.token)throw new Error(o.message||"Registration failed");return this.token=o.token,this.user=o.user,this._storeToken(this.token),this._storeUser(this.user),this.emit("register",this.user),this.user}catch(e){throw this.emit("error",e.message||"Registration failed"),e}},logout(){this.token=null,this.user=null,this._clearToken(),this._clearUser(),this.emit("logout",null)},getUser(){return this.user},isAuthenticated(){return!!this.token&&!!this.user},getHeaders(){return this.token?{Authorization:`Bearer ${this.token}`}:{}},getApiUrl(){return this.apiUrl},getRole(){return this.user?.role||null},hasRole(e){return this.user?.role===e},hasAnyRole(e){return e.includes(this.user?.role)},isAdmin(){return"admin"===this.user?.role},isSubscriber(){return"subscriber"===this.user?.role},isGuest(){return"guest"===this.user?.role},async _verifyToken(){if(!this.token)throw new Error("No token to verify");try{const e=await d.get(`${this.apiUrl}/auth/me`,{headers:this.getHeaders(),silent:!0});if(!e.success||!e.user)throw new Error("Token verification failed");return this.user=e.user,this._storeUser(this.user),this.user}catch(e){throw this._clearToken(),this._clearUser(),e}},_storeToken(e){J.set(this.config.storageKey,e)},_storeUser(e){J.set(this.config.userStorageKey,e)},_clearToken(){J.remove(this.config.storageKey),this.token=null},_clearUser(){J.remove(this.config.userStorageKey),this.user=null},on(e,t){this.eventHandlers[e]||(this.eventHandlers[e]=[]),this.eventHandlers[e].push(t)},off(e,t){this.eventHandlers[e]&&(this.eventHandlers[e]=t?this.eventHandlers[e].filter(e=>e!==t):[])},emit(e,t){this.eventHandlers[e]&&this.eventHandlers[e].forEach(n=>{try{n(t)}catch(t){console.error(`Error in auth event handler for '${e}':`,t)}})}};class Rs extends h{static defaults={emailPlaceholder:"your@email.com",passwordPlaceholder:"Enter your password",buttonText:"Login",showLabels:!0,onSubmit:null,onSuccess:null,onError:null};constructor(e,t={}){super(e,t),this._init()}_init(){if(!this.element)return;this.render();const e=this.element.querySelector("form");e&&this._addEventListener(e,"submit",async e=>{e.preventDefault(),await this.handleSubmit()})}render(){const e=this.options,t=`\n <form class="auth-login-form">\n <div class="form-group">\n ${e.showLabels?'<label class="form-label">Email</label>':""}\n <input\n type="email"\n class="form-input"\n name="email"\n placeholder="${e.emailPlaceholder}"\n required>\n </div>\n <div class="form-group">\n ${e.showLabels?'<label class="form-label">Password</label>':""}\n <input\n type="password"\n class="form-input"\n name="password"\n placeholder="${e.passwordPlaceholder}"\n required>\n </div>\n <button type="submit" class="btn btn-primary btn-block" style="margin-top: 1rem;">${e.buttonText}</button>\n </form>\n `;this.element.innerHTML=t}async handleSubmit(){const e=this.element.querySelector("form"),t=e.querySelector('[name="email"]').value,n=e.querySelector('[name="password"]').value;this.options.onSubmit&&this.options.onSubmit(t,n);try{await Ps.login(t,n),this.options.onSuccess&&this.options.onSuccess(Ps.getUser())}catch(e){this.options.onError&&this.options.onError(e)}}}class Fs extends h{static defaults={namePlaceholder:"Your name",emailPlaceholder:"your@email.com",passwordPlaceholder:"Create a password",buttonText:"Register",minPasswordLength:6,showLabels:!0,onSubmit:null,onSuccess:null,onError:null};constructor(e,t={}){super(e,t),this._init()}_init(){if(!this.element)return;this.render();const e=this.element.querySelector("form");e&&this._addEventListener(e,"submit",async e=>{e.preventDefault(),await this.handleSubmit()})}render(){const e=this.options,t=`\n <form class="auth-register-form">\n <div class="form-group">\n ${e.showLabels?'<label class="form-label">Name</label>':""}\n <input\n type="text"\n class="form-input"\n name="name"\n placeholder="${e.namePlaceholder}"\n required>\n </div>\n <div class="form-group">\n ${e.showLabels?'<label class="form-label">Email</label>':""}\n <input\n type="email"\n class="form-input"\n name="email"\n placeholder="${e.emailPlaceholder}"\n required>\n </div>\n <div class="form-group">\n ${e.showLabels?'<label class="form-label">Password</label>':""}\n <input\n type="password"\n class="form-input"\n name="password"\n placeholder="${e.passwordPlaceholder}"\n minlength="${e.minPasswordLength}"\n required>\n </div>\n <div class="form-group">\n ${e.showLabels?'<label class="form-label">Confirm Password</label>':""}\n <input\n type="password"\n class="form-input"\n name="confirmPassword"\n placeholder="Re-enter your password"\n minlength="${e.minPasswordLength}"\n required>\n </div>\n \x3c!-- Honeypot field - hidden from users, bots will fill it --\x3e\n <div class="form-group" style="position: absolute; left: -9999px; opacity: 0; pointer-events: none;" aria-hidden="true">\n <label for="website">Website</label>\n <input\n type="text"\n class="form-input"\n name="website"\n id="website"\n tabindex="-1"\n autocomplete="off">\n </div>\n <button type="submit" class="btn btn-primary btn-block" style="margin-top: 1rem;">${e.buttonText}</button>\n </form>\n `;this.element.innerHTML=t}async handleSubmit(){const e=this.element.querySelector("form"),t=e.querySelector('[name="name"]').value,n=e.querySelector('[name="email"]').value,o=e.querySelector('[name="password"]').value,s=e.querySelector('[name="confirmPassword"]').value;if(e.querySelector('[name="website"]').value)return console.warn("[Auth] Honeypot triggered - possible bot detected"),void(this.options.onError&&this.options.onError(new Error("Registration failed. Please try again.")));if(o===s){this.options.onSubmit&&this.options.onSubmit(n,o,t);try{await Ps.register(n,o,t),this.options.onSuccess&&this.options.onSuccess(Ps.getUser())}catch(e){this.options.onError&&this.options.onError(e)}}else this.options.onError&&this.options.onError(new Error("Passwords do not match. Please try again."))}}class qs extends h{static defaults={activeTab:"login",loginText:"Login",registerText:"Register",onChange:null};constructor(e,t={}){super(e,t),this._init()}_init(){if(!this.element)return;this.render();this.element.querySelectorAll("[data-tab]").forEach(e=>{this._addEventListener(e,"click",()=>{this.switchTab(e.getAttribute("data-tab"))})})}render(){const e=this.options,t=`\n <div class="btn-group btn-group-block" style="margin-bottom: 1.5rem;">\n <button class="btn ${"login"===e.activeTab?"active":""}" data-tab="login">\n ${e.loginText}\n </button>\n <button class="btn ${"register"===e.activeTab?"active":""}" data-tab="register">\n ${e.registerText}\n </button>\n </div>\n `;this.element.innerHTML=t}switchTab(e){this.options.activeTab=e;this.element.querySelectorAll("[data-tab]").forEach(t=>{t.getAttribute("data-tab")===e?t.classList.add("active"):t.classList.remove("active")}),this.options.onChange&&this.options.onChange(e)}}class Us extends h{static defaults={showIcon:!0,showRole:!0,logoutText:"Logout",onLogout:null};_init(){if(!this.element)return;this.render();const e=this.element.querySelector(".auth-logout-btn");e&&this._addEventListener(e,"click",()=>{this.handleLogout()}),Ps.on("login",()=>this.render()),Ps.on("logout",()=>this.render())}render(){const e=this.options,t=Ps.getUser();if(!t)return void(this.element.innerHTML="");this.element.innerHTML="";const n=document.createElement("div");n.className="auth-user-info";const o=document.createElement("span");if(o.className="auth-user-email",e.showIcon){const e=document.createElement("span");e.setAttribute("data-icon","user"),e.setAttribute("data-icon-size","18"),o.appendChild(e)}const s=document.createTextNode(t.email);if(o.appendChild(s),!1!==e.showRole&&t.role){const e={admin:"badge-danger",subscriber:"badge-primary",guest:"badge-secondary"}[t.role]||"badge-secondary",n=document.createElement("span");n.className=`badge ${e}`,n.textContent=t.role.charAt(0).toUpperCase()+t.role.slice(1),o.appendChild(n)}const i=document.createElement("button");i.className="auth-logout-btn",i.textContent=e.logoutText,n.appendChild(o),n.appendChild(i),this.element.appendChild(n)}handleLogout(){Ps.logout(),this.options.onLogout&&this.options.onLogout()}}Ps.LoginForm=Rs,Ps.RegisterForm=Fs,Ps.AuthTabs=qs,Ps.UserInfo=Us,Ps.createLoginForm=(e,t)=>new Rs(e,t),Ps.createRegisterForm=(e,t)=>new Fs(e,t),Ps.createAuthTabs=(e,t)=>new qs(e,t),Ps.createUserInfo=(e,t)=>new Us(e,t);const Ks={_routes:[],_views:{},_currentRoute:null,_container:null,_defaultRoute:"/",_notFoundView:null,_middleware:[],_transitioning:!1,_transitions:{},_initialised:!1,_templateCache:{},init(e={}){if(this._initialised)return console.warn("[Domma Router] Already initialised"),this;if(this._container=document.querySelector(e.container),!this._container)throw new Error(`[Domma Router] Container "${e.container}" not found`);return this._routes=e.routes||[],this._views=e.views||{},this._defaultRoute=e.default||"/",this._notFoundView=e.notFound||"404",this._transitions=e.transitions||{enter:"fadeIn",leave:"fadeOut",duration:200},window.addEventListener("hashchange",()=>this._handleRouteChange()),this._handleRouteChange(),this._initialised=!0,"undefined"!=typeof window&&window.M&&window.M.publish("router:ready",{router:this}),this},navigate(e,t={}){this._initialised?t.replace?window.location.replace(`#${e}`):window.location.hash=e:console.error("[Domma Router] Router not initialised. Call R.init() first.")},back(){window.history.back()},forward(){window.history.forward()},current(){return this._currentRoute},view(e,t){return this._views[e]=t,this},route(e){return this._routes.push(e),this},use(e){return this._middleware.push(e),this},destroy(){window.removeEventListener("hashchange",this._handleRouteChange),this._routes=[],this._views={},this._middleware=[],this._currentRoute=null,this._initialised=!1},async _handleRouteChange(){if(this._transitioning)return;const e=window.location.hash.slice(1)||this._defaultRoute,{route:t,params:n}=this._matchRoute(e);if(!t)return this._renderNotFound(e);const o=this._currentRoute,s={...t,params:n,path:e};if(await this._runMiddleware(s,o)){if(o?.onLeave){if(!1===await o.onLeave())return}if("undefined"!=typeof window&&window.M&&window.M.publish("router:beforeChange",{from:o,to:s}),t.onEnter){if(!1===await t.onEnter(n))return}t.title&&(document.title=t.title),await this._renderView(t.view,n),this._currentRoute=s,"undefined"!=typeof window&&window.M&&window.M.publish("router:afterChange",{from:o,to:s})}},_matchRoute(e){for(const t of this._routes){const n=this._extractParams(t.path,e);if(null!==n)return{route:t,params:n}}return{route:null,params:{}}},_extractParams(e,t){const n=e.split("/").filter(Boolean),o=t.split("/").filter(Boolean);if(n.length!==o.length)return null;const s={};for(let e=0;e<n.length;e++)if(n[e].startsWith(":"))s[n[e].slice(1)]=o[e];else if(n[e]!==o[e])return null;return s},async _runMiddleware(e,t){for(const n of this._middleware){let o=!1;const s=()=>{o=!0};if(await n(e,t,s),!o)return!1}return!0},async _renderView(e,t){this._transitioning=!0;const n=this._views[e];if(!n)return console.error(`[Domma Router] View "${e}" not found`),void(this._transitioning=!1);const o="undefined"!=typeof window&&window.$?window.$:null;if(!o)return console.error("[Domma Router] jQuery/Domma $ not found. Cannot animate transitions."),this._renderViewStatic(n,t),void(this._transitioning=!1);const s=o(this._container);await new Promise(e=>{s.fadeOut(this._transitions.duration,e)}),await this._renderContent(n,t,s),await new Promise(e=>{s.fadeIn(this._transitions.duration,e)}),this._transitioning=!1},async _loadTemplate(e){if(this._templateCache[e])return this._templateCache[e];try{const t=await fetch(e);if(!t.ok)throw new Error(`Failed to load template: ${e} (${t.status})`);const n=await t.text();return this._templateCache[e]=n,n}catch(e){throw console.error("[Domma Router] Template load error:",e),e}},async _renderContent(e,t,n){let o;if("object"==typeof e&&e.component&&!Array.isArray(e)){const o=e.component,s=n[0]||n,i="function"==typeof e.props?e.props(t):e.props||{},r=document.createElement(o);for(const[e,t]of Object.entries(i)){const n=e.replace(/([A-Z])/g,"-$1").toLowerCase();!0===t||""===t?r.setAttribute(n,""):!1!==t&&null!=t&&r.setAttribute(n,"object"==typeof t?JSON.stringify(t):String(t))}for(;s.firstChild;)s.removeChild(s.firstChild);return s.appendChild(r),void("function"==typeof e.onMount&&e.onMount(n))}if("object"!=typeof e||Array.isArray(e))"function"==typeof e?(o=await e(t),n.html(o,{safe:!1}),"undefined"!=typeof window&&window.I&&window.I.scan(this._container)):"string"==typeof e&&(o=this._renderTemplate(e,t),n.html(o,{safe:!1}),"undefined"!=typeof window&&window.I&&window.I.scan(this._container));else{let s=e.template;!s&&e.templateUrl&&(s=await this._loadTemplate(e.templateUrl));let i={};if(e.partials){const t=Object.entries(e.partials),n=await Promise.all(t.map(([e,t])=>this._loadTemplate(t).then(t=>[e,t])));i=Object.fromEntries(n)}"function"==typeof s?o=await s(t):"string"==typeof s&&(o=this._renderTemplate(s,t,i)),n.html(o,{safe:!1}),"undefined"!=typeof window&&window.I&&window.I.scan(this._container),e.onMount&&"function"==typeof e.onMount&&e.onMount(n)}},_renderTemplate:(e,t,n={})=>"undefined"!=typeof window&&window._&&"function"==typeof window._.render?window._.render(e,t||{},{partials:n}):e.replace(/\{\{(\w+)\}\}/g,(e,n)=>t[n]||""),async _renderViewStatic(e,t){if("object"==typeof e&&e.component&&!Array.isArray(e)){const n=e.component,o=this._container[0]||this._container,s="function"==typeof e.props?e.props(t):e.props||{},i=document.createElement(n);for(const[e,t]of Object.entries(s)){const n=e.replace(/([A-Z])/g,"-$1").toLowerCase();!0===t||""===t?i.setAttribute(n,""):!1!==t&&null!=t&&i.setAttribute(n,"object"==typeof t?JSON.stringify(t):String(t))}for(;o.firstChild;)o.removeChild(o.firstChild);return o.appendChild(i),"function"==typeof e.onMount&&e.onMount(this._container),void("undefined"!=typeof window&&window.I&&window.I.scan(o))}let n;if("object"!=typeof e||Array.isArray(e))"function"==typeof e?(n=await e(t),this._container.innerHTML=n):"string"==typeof e&&(n=this._renderTemplate(e,t),this._container.innerHTML=n);else{let o=e.template;!o&&e.templateUrl&&(o=await this._loadTemplate(e.templateUrl));let s={};if(e.partials){const t=Object.entries(e.partials),n=await Promise.all(t.map(([e,t])=>this._loadTemplate(t).then(t=>[e,t])));s=Object.fromEntries(n)}"function"==typeof o?n=await o(t):"string"==typeof o&&(n=this._renderTemplate(o,t,s)),this._container.innerHTML=n,e.onMount&&"function"==typeof e.onMount&&e.onMount(this._container)}"undefined"!=typeof window&&window.I&&window.I.scan(this._container)},async _renderNotFound(e){if(this._views[this._notFoundView])await this._renderView(this._notFoundView,{path:e});else{const t=this._container;t.textContent="";const n=document.createElement("div");n.style.cssText="text-align: center; padding: 4rem 1rem;";const o=document.createElement("h1");o.style.cssText="font-size: 4rem; margin-bottom: 1rem;",o.textContent="404";const s=document.createElement("p");s.style.cssText="font-size: 1.25rem; color: #666;",s.textContent=`Page not found: ${e}`;const i=document.createElement("a");i.href="#/",i.style.cssText="color: #3b82f6; text-decoration: underline; margin-top: 1rem; display: inline-block;",i.textContent="Go Home",n.appendChild(o),n.appendChild(s),n.appendChild(i),t.appendChild(n)}}},Ys=new Map,Js=new Map;function Gs(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function Xs(e,t={}){if(null==e)return void 0!==t.default?"function"==typeof t.default?t.default():t.default:null;const n=t.type;if(n===Ro.types?.number||"number"===n){const t=Number(e);return isNaN(t)?null:t}if(n===Ro.types?.boolean||"boolean"===n)return""===e||"true"===e||"false"!==e&&Boolean(e);if(n===Ro.types?.array||"array"===n||n===Ro.types?.object||"object"===n)try{return JSON.parse(e)}catch{return e}return e}function Zs(e,t){if(Js.has(e))return void console.warn(`[Domma Component] "${e}" is already registered.`);const{template:n,templateUrl:o,props:s={},data:i,computed:r={},methods:a={},onBeforeMount:l,onMount:d,onUpdated:h,onBeforeUnmount:u,onUnmount:m,onPropsChanged:f,style:g=""}=t,v=Object.keys(s),y=v.map(Gs);class b extends p{static get observedAttributes(){return y}constructor(){super(),this._model=null,this._props={},this._bindings=null,this._template=null,this._contentRoot=null,this._context=null,this._unsubs=[],this._computeds=new Map,this._effects=[],this._updateQueued=!1,this._teardown=!1}connectedCallback(){if(this._initialised)return this._teardown=!1,void d?.call(this._ctx());this._initialised=!0,this._initProps(),this._initModel(),this._initComputeds(),this._injectStyles(),this._contentRoot=document.createElement("div"),this._contentRoot.className="dm-component-root",this.shadowRoot.appendChild(this._contentRoot),l?.call(this._ctx()),this._renderComponent().then(()=>{this._wireBindings(),d?.call(this._ctx())})}disconnectedCallback(){this._teardown=!0,u?.call(this._ctx()),this._cleanup();for(const e of this._unsubs)e();this._unsubs=[];for(const e of this._effects)e.dispose();this._effects=[];for(const e of this._computeds.values())e.dispose();this._computeds.clear(),this._model&&this._model.destroy(),m?.call(this._ctx())}attributeChangedCallback(e,t,n){if(t===n)return;const o=e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase());if(this._props[o]=Xs(n,s[o]),f?.call(this._ctx(),o,t,n),this._initialised&&this._bindings){for(const e of this._computeds.values())e.invalidate();this._rerenderFull()}}_initProps(){for(const e of v){const t=Gs(e),n=this.hasAttribute(t)?this.getAttribute(t):null;this._props[e]=Xs(n,s[e])}}_initModel(){const e=i?i():{},t={};for(const n of Object.keys(e))t[n]={};this._model=Ro.create(t,e)}_initComputeds(){for(const[e,t]of Object.entries(r))this._computeds.set(e,de(()=>t.call(this._ctx()),{label:e}))}async _renderComponent(){let e=n;!e&&o&&(e=await async function(e){if(Ys.has(e))return Ys.get(e);const t=await fetch(e);if(!t.ok)throw new Error(`[Domma Component] Failed to load template: ${e} (${t.status})`);const n=await t.text();return Ys.set(e,n),n}(o)),e?(this._template=e,this._bindings=Lo.compile(e,this._mergeData(),this._contentRoot,(e,t)=>c.render(e,t))):this._contentRoot.textContent=""}_rerenderFull(){this._bindings&&(this._bindings.rerenderAll(this._mergeData()),h?.call(this._ctx()))}_wireBindings(){if(this._bindings){for(const e of this._bindings.bindings){const t=[...e.deps].filter(e=>this._computeds.has(e)||!Object.prototype.hasOwnProperty.call(this._props,e));if(0===t.length)continue;let n=!1;const o=ce(()=>{for(const e of t)this._readBound(e);n?he(()=>{this._bindings.update(e.id,this._mergeData()),this._scheduleUpdate()}):n=!0},{label:`${this.tagName.toLowerCase()}:${e.id}`});this._effects.push(o)}this._wireUpdateWatcher()}}_wireUpdateWatcher(){if(!h||!this._model)return;let e=!1;const t=ce(()=>{this._model.get(),e?he(()=>this._scheduleUpdate()):e=!0},{label:`${this.tagName.toLowerCase()}:updated`});this._effects.push(t)}_readBound(e){return this._computeds.has(e)?this._computeds.get(e).get():Object.prototype.hasOwnProperty.call(this._props,e)?this._props[e]:this._model?this._model.get(e):void 0}_scheduleUpdate(){this._updateQueued||(this._updateQueued=!0,Promise.resolve().then(()=>{this._updateQueued=!1,!this._teardown&&this._initialised&&this._bindings&&h?.call(this._ctx())}))}_getStyles(){return"\n :host {\n --dm-primary: var(--dm-primary, #6495ED);\n --dm-secondary: var(--dm-secondary, #6c757d);\n --dm-success: var(--dm-success, #28a745);\n --dm-danger: var(--dm-danger, #dc3545);\n --dm-warning: var(--dm-warning, #ffc107);\n --dm-info: var(--dm-info, #17a2b8);\n --dm-white: var(--dm-white, #ffffff);\n --dm-gray-100: var(--dm-gray-100, #f8f9fa);\n --dm-gray-200: var(--dm-gray-200, #e9ecef);\n --dm-gray-300: var(--dm-gray-300, #dee2e6);\n --dm-gray-400: var(--dm-gray-400, #ced4da);\n --dm-gray-500: var(--dm-gray-500, #adb5bd);\n --dm-gray-600: var(--dm-gray-600, #6c757d);\n --dm-gray-700: var(--dm-gray-700, #495057);\n --dm-gray-800: var(--dm-gray-800, #343a40);\n --dm-gray-900: var(--dm-gray-900, #212529);\n --dm-radius-sm: var(--dm-radius-sm, 0.25rem);\n --dm-radius-md: var(--dm-radius-md, 0.375rem);\n --dm-radius-lg: var(--dm-radius-lg, 0.5rem);\n --dm-radius-full: var(--dm-radius-full, 9999px);\n --dm-transition-fast: var(--dm-transition-fast, 150ms);\n --dm-transition-normal: var(--dm-transition-normal, 300ms);\n --dm-transition-slow: var(--dm-transition-slow, 500ms);\n --dm-shadow-sm: var(--dm-shadow-sm, 0 1px 2px 0 rgba(0, 0, 0, 0.05));\n --dm-shadow-md: var(--dm-shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1));\n --dm-shadow-lg: var(--dm-shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));\n --dm-shadow-xl: var(--dm-shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, 0.1));\n }\n "+(g||"")}_ctx(){if(this._context)return this._context;const e=this,t={get data(){return e._model?e._model.tracked():{}},get props(){return{...e._props}},get root(){return e.shadowRoot},get el(){return e},set(t){e._model&&e._model.set(t)}};for(const[n,o]of Object.entries(r))Object.defineProperty(t,n,{get(){const t=e._computeds.get(n);return t?t.get():o.call(e._ctx())},enumerable:!0,configurable:!0});for(const[e,n]of Object.entries(a))t[e]=n.bind(t);return this._context=t,t}_mergeData(){const e=this._model?this._model.toJSON():{},t={};for(const[e,n]of this._computeds.entries())t[e]=n.get();const n={},o=this._ctx();for(const e of Object.keys(a))n[e]=o[e];const s={...n,...e,...this._props,...t},i=this._model;return G(s,{onWrite:i?(e,t)=>i.set({[e]:t}):void 0})}}const k=e.includes("-")?e:`domma-${e}`;return customElements.define(k,b),Js.set(e,t),b}const Qs={define:(e,t)=>Zs(e,t),has:e=>Js.has(e),registry:()=>new Map(Js),get templateCache(){return Ys}},ei={"domma-badge":f,"domma-tooltip":v,"domma-loader":y,"domma-back-to-top":b,"domma-toast":k,"domma-modal":_,"domma-card":w};function ti(){for(const[e,t]of Object.entries(ei))customElements.get(e)||customElements.define(e,t)}ti(),ti();let ni=!0;"undefined"!=typeof document&&document.body?document.body.classList.add("dm-cloaked"):"undefined"!=typeof document&&document.addEventListener("DOMContentLoaded",()=>{ni&&document.body.classList.add("dm-cloaked")});const oi=(e,t)=>l(e,t);oi.version="0.41.0",oi.buildInfo={version:"0.41.0",built:"22/08/2026 13:41",commit:"5d8b7e1"},oi.http=d,oi.utils=c,oi.setup=e=>(!1===e.cloak&&(ni=!1,"undefined"!=typeof document&&document.body&&(document.body.classList.remove("dm-cloaked"),document.body.classList.add("dm-ready"))),e.noStyles?Vs.init({disabled:!0}):(e.theme||e.autoDetectTheme)&&Vs.init({theme:e.theme,autoDetect:e.autoDetectTheme,persist:!1!==e.persistTheme}),e.scanIcons&&Bs.scan(),es.process(e)),oi.update=(e,t)=>es.update(e,t),oi.config=e=>es.config(e),oi.getComponent=e=>es.getComponent(e),oi.reset=e=>es.reset(e),oi.ready=e=>es.ready(e),oi.models=Ro,oi.elements=Y,oi.effects=Qo,oi.dates=hs,oi.tables=Ws,oi.forms=qo,oi.theme=Vs,oi.icons=Bs,oi.storage=J,oi.auth=Ps,oi.router=Ks,oi.sanitize=r,oi.components=Qs,oi.component=(e,t)=>Zs(e,t),oi.DesktopNotification=j;const si=oi,ii=c,ri=Ro,ai=hs,li=J,di=Ps,ci=qo,hi=d,ui=Y,pi=Bs,mi=Ws,fi=Ks,gi={extend:Ro.extend.bind(Ro),pick:Ro.pick.bind(Ro),omit:Ro.omit.bind(Ro)};if(oi.M=ri,oi.D=ai,oi.S=li,oi.A=di,oi.F=ci,oi.H=hi,oi.E=ui,oi.I=pi,oi.T=mi,oi.R=fi,oi.B=gi,"undefined"!=typeof window&&(window.Domma=oi,window.$=si,window._=ii,window.M=ri,window.D=ai,window.S=li,window.A=di,window.F=ci,window.H=hi,window.E=ui,window.I=pi,window.T=mi,window.R=fi,window.B=gi),"undefined"!=typeof document){const e=()=>{ni&&document.body.classList.contains("dm-cloaked")&&document.body.classList.add("dm-ready")};"complete"===document.readyState?setTimeout(e,0):window.addEventListener("load",e)}e.$=si,e.A=di,e.B=gi,e.D=ai,e.Domma=oi,e.E=ui,e.F=ci,e.H=hi,e.I=pi,e.M=ri,e.R=fi,e.S=li,e.T=mi,e._=ii,e.components=Qs,e.default=oi,Object.defineProperty(e,"__esModule",{value:!0})});